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 CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ |
6 #define CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ | 6 #define CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 12 matching lines...) Expand all Loading... |
23 // to propagate to about:signin-internals via SigninInternalsUI. | 23 // to propagate to about:signin-internals via SigninInternalsUI. |
24 class AboutSigninInternals | 24 class AboutSigninInternals |
25 : public ProfileKeyedService, | 25 : public ProfileKeyedService, |
26 public signin_internals_util::SigninDiagnosticsObserver { | 26 public signin_internals_util::SigninDiagnosticsObserver { |
27 public: | 27 public: |
28 class Observer { | 28 class Observer { |
29 public: | 29 public: |
30 // |info| will contain the dictionary of signin_status_ values as indicated | 30 // |info| will contain the dictionary of signin_status_ values as indicated |
31 // in the comments for GetSigninStatus() below. | 31 // in the comments for GetSigninStatus() below. |
32 virtual void OnSigninStateChanged(scoped_ptr<DictionaryValue> info) = 0; | 32 virtual void OnSigninStateChanged(scoped_ptr<DictionaryValue> info) = 0; |
| 33 |
| 34 protected: |
| 35 virtual ~Observer() { } |
33 }; | 36 }; |
34 | 37 |
35 AboutSigninInternals(); | 38 AboutSigninInternals(); |
36 virtual ~AboutSigninInternals(); | 39 virtual ~AboutSigninInternals(); |
37 | 40 |
38 // Each instance of SigninInternalsUI adds itself as an observer to be | 41 // Each instance of SigninInternalsUI adds itself as an observer to be |
39 // notified of all updates that AboutSigninInternals receives. | 42 // notified of all updates that AboutSigninInternals receives. |
40 void AddSigninObserver(Observer* observer); | 43 void AddSigninObserver(Observer* observer); |
41 void RemoveSigninObserver(Observer* observer); | 44 void RemoveSigninObserver(Observer* observer); |
42 | 45 |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
91 // Encapsulates the actual signin and token related values. | 94 // Encapsulates the actual signin and token related values. |
92 // Most of the values are mirrored in the prefs for persistance. | 95 // Most of the values are mirrored in the prefs for persistance. |
93 signin_internals_util::SigninStatus signin_status_; | 96 signin_internals_util::SigninStatus signin_status_; |
94 | 97 |
95 ObserverList<Observer> signin_observers_; | 98 ObserverList<Observer> signin_observers_; |
96 | 99 |
97 DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals); | 100 DISALLOW_COPY_AND_ASSIGN(AboutSigninInternals); |
98 }; | 101 }; |
99 | 102 |
100 #endif // CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ | 103 #endif // CHROME_BROWSER_SIGNIN_ABOUT_SIGNIN_INTERNALS_H_ |
OLD | NEW |