Update To 11.40.268.0
[platform/framework/web/crosswalk.git] / src / chrome / browser / ui / ash / user_accounts_delegate_chromeos.h
1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CHROME_BROWSER_UI_ASH_USER_ACCOUNTS_DELEGATE_CHROMEOS_H_
6 #define CHROME_BROWSER_UI_ASH_USER_ACCOUNTS_DELEGATE_CHROMEOS_H_
7
8 #include "ash/system/user/user_accounts_delegate.h"
9 #include "base/compiler_specific.h"
10 #include "base/macros.h"
11 #include "google_apis/gaia/oauth2_token_service.h"
12
13 class Profile;
14
15 namespace chromeos {
16
17 class UserAccountsDelegateChromeOS : public ash::tray::UserAccountsDelegate,
18                                      public OAuth2TokenService::Observer {
19  public:
20   explicit UserAccountsDelegateChromeOS(Profile* user_profile);
21   virtual ~UserAccountsDelegateChromeOS();
22
23   // Overridden from ash::tray::UserAccountsDelegate:
24   virtual std::string GetPrimaryAccountId() override;
25   virtual std::vector<std::string> GetSecondaryAccountIds() override;
26   virtual std::string GetAccountDisplayName(
27       const std::string& account_id) override;
28   virtual void DeleteAccount(const std::string& account_id) override;
29   virtual void LaunchAddAccountDialog() override;
30
31   // Overridden from OAuth2TokenServiceObserver:
32   virtual void OnRefreshTokenAvailable(const std::string& account_id) override;
33   virtual void OnRefreshTokenRevoked(const std::string& account_id) override;
34
35  private:
36   Profile* user_profile_;
37
38   DISALLOW_COPY_AND_ASSIGN(UserAccountsDelegateChromeOS);
39 };
40
41 }  // namespace chromeos
42
43 #endif  // CHROME_BROWSER_UI_ASH_USER_ACCOUNTS_DELEGATE_CHROMEOS_H_