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.
5 #ifndef CHROME_BROWSER_UI_ASH_USER_ACCOUNTS_DELEGATE_CHROMEOS_H_
6 #define CHROME_BROWSER_UI_ASH_USER_ACCOUNTS_DELEGATE_CHROMEOS_H_
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"
17 class UserAccountsDelegateChromeOS
: public ash::tray::UserAccountsDelegate
,
18 public OAuth2TokenService::Observer
{
20 explicit UserAccountsDelegateChromeOS(Profile
* user_profile
);
21 virtual ~UserAccountsDelegateChromeOS();
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
;
31 // Overridden from OAuth2TokenServiceObserver:
32 virtual void OnRefreshTokenAvailable(const std::string
& account_id
) override
;
33 virtual void OnRefreshTokenRevoked(const std::string
& account_id
) override
;
36 Profile
* user_profile_
;
38 DISALLOW_COPY_AND_ASSIGN(UserAccountsDelegateChromeOS
);
41 } // namespace chromeos
43 #endif // CHROME_BROWSER_UI_ASH_USER_ACCOUNTS_DELEGATE_CHROMEOS_H_