| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ | 5 #ifndef COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ |
| 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ | 6 #define COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| 11 #include "base/memory/linked_ptr.h" |
| 11 #include "base/memory/scoped_ptr.h" | 12 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/observer_list.h" | 13 #include "base/observer_list.h" |
| 13 #include "base/values.h" | 14 #include "base/values.h" |
| 14 #include "components/keyed_service/core/keyed_service.h" | 15 #include "components/keyed_service/core/keyed_service.h" |
| 15 #include "components/signin/core/browser/signin_client.h" | 16 #include "components/signin/core/browser/signin_client.h" |
| 16 #include "components/signin/core/browser/signin_internals_util.h" | 17 #include "components/signin/core/browser/signin_internals_util.h" |
| 17 #include "components/signin/core/browser/signin_manager.h" | 18 #include "components/signin/core/browser/signin_manager.h" |
| 18 #include "google_apis/gaia/gaia_auth_consumer.h" | 19 #include "google_apis/gaia/gaia_auth_consumer.h" |
| 19 #include "google_apis/gaia/oauth2_token_service.h" | 20 #include "google_apis/gaia/oauth2_token_service.h" |
| 20 | 21 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 32 class AboutSigninInternals | 33 class AboutSigninInternals |
| 33 : public KeyedService, | 34 : public KeyedService, |
| 34 public signin_internals_util::SigninDiagnosticsObserver, | 35 public signin_internals_util::SigninDiagnosticsObserver, |
| 35 public OAuth2TokenService::DiagnosticsObserver, | 36 public OAuth2TokenService::DiagnosticsObserver, |
| 36 public GaiaAuthConsumer { | 37 public GaiaAuthConsumer { |
| 37 public: | 38 public: |
| 38 class Observer { | 39 class Observer { |
| 39 public: | 40 public: |
| 40 // |info| will contain the dictionary of signin_status_ values as indicated | 41 // |info| will contain the dictionary of signin_status_ values as indicated |
| 41 // in the comments for GetSigninStatus() below. | 42 // in the comments for GetSigninStatus() below. |
| 42 virtual void OnSigninStateChanged( | 43 virtual void OnSigninStateChanged(const base::DictionaryValue* info) = 0; |
| 43 scoped_ptr<base::DictionaryValue> info) = 0; | |
| 44 | 44 |
| 45 // Notification that the cookie accounts are ready to be displayed. | 45 // Notification that the cookie accounts are ready to be displayed. |
| 46 virtual void OnCookieAccountsFetched( | 46 virtual void OnCookieAccountsFetched(const base::DictionaryValue* info) = 0; |
| 47 scoped_ptr<base::DictionaryValue> info) = 0; | |
| 48 }; | 47 }; |
| 49 | 48 |
| 50 AboutSigninInternals(ProfileOAuth2TokenService* token_service, | 49 AboutSigninInternals(ProfileOAuth2TokenService* token_service, |
| 51 SigninManagerBase* signin_manager); | 50 SigninManagerBase* signin_manager); |
| 52 virtual ~AboutSigninInternals(); | 51 virtual ~AboutSigninInternals(); |
| 53 | 52 |
| 54 // Each instance of SigninInternalsUI adds itself as an observer to be | 53 // Each instance of SigninInternalsUI adds itself as an observer to be |
| 55 // notified of all updates that AboutSigninInternals receives. | 54 // notified of all updates that AboutSigninInternals receives. |
| 56 void AddSigninObserver(Observer* observer); | 55 void AddSigninObserver(Observer* observer); |
| 57 void RemoveSigninObserver(Observer* observer); | 56 void RemoveSigninObserver(Observer* observer); |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 | 205 |
| 207 ObserverList<Observer> signin_observers_; | 206 ObserverList<Observer> signin_observers_; |
| 208 | 207 |
| 209 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription> | 208 scoped_ptr<SigninClient::CookieChangedCallbackList::Subscription> |
| 210 cookie_changed_subscription_; | 209 cookie_changed_subscription_; |
| 211 | 210 |
| 212 DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals); | 211 DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals); |
| 213 }; | 212 }; |
| 214 | 213 |
| 215 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ | 214 #endif // COMPONENTS_SIGNIN_CORE_BROWSER_ABOUT_SIGNIN_INTERNALS_H_ |
| OLD | NEW |