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