OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 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 | 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_CHROME_SIGNIN_CLIENT_H_ | 5 #ifndef CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ |
6 #define CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ | 6 #define CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "components/signin/core/browser/signin_client.h" | 10 #include "components/signin/core/browser/signin_client.h" |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
49 virtual bool CanRevokeCredentials() OVERRIDE; | 49 virtual bool CanRevokeCredentials() OVERRIDE; |
50 virtual std::string GetSigninScopedDeviceId() OVERRIDE; | 50 virtual std::string GetSigninScopedDeviceId() OVERRIDE; |
51 virtual void ClearSigninScopedDeviceId() OVERRIDE; | 51 virtual void ClearSigninScopedDeviceId() OVERRIDE; |
52 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; | 52 virtual net::URLRequestContextGetter* GetURLRequestContext() OVERRIDE; |
53 virtual bool ShouldMergeSigninCredentialsIntoCookieJar() OVERRIDE; | 53 virtual bool ShouldMergeSigninCredentialsIntoCookieJar() OVERRIDE; |
54 | 54 |
55 // Returns a string describing the chrome version environment. Version format: | 55 // Returns a string describing the chrome version environment. Version format: |
56 // <Build Info> <OS> <Version number> (<Last change>)<channel or "-devel"> | 56 // <Build Info> <OS> <Version number> (<Last change>)<channel or "-devel"> |
57 // If version information is unavailable, returns "invalid." | 57 // If version information is unavailable, returns "invalid." |
58 virtual std::string GetProductVersion() OVERRIDE; | 58 virtual std::string GetProductVersion() OVERRIDE; |
59 virtual void SetCookieChangedCallback(const CookieChangedCallback& callback) | 59 virtual scoped_ptr<CookieChangedCallbackList::Subscription> |
60 OVERRIDE; | 60 AddCookieChangedCallback(const CookieChangedCallback& callback) OVERRIDE; |
61 virtual void GoogleSigninSucceeded(const std::string& username, | 61 virtual void GoogleSigninSucceeded(const std::string& username, |
62 const std::string& password) OVERRIDE; | 62 const std::string& password) OVERRIDE; |
63 | 63 |
64 // content::NotificationObserver implementation. | 64 // content::NotificationObserver implementation. |
65 virtual void Observe(int type, | 65 virtual void Observe(int type, |
66 const content::NotificationSource& source, | 66 const content::NotificationSource& source, |
67 const content::NotificationDetails& details) OVERRIDE; | 67 const content::NotificationDetails& details) OVERRIDE; |
68 | 68 |
69 private: | 69 private: |
70 void RegisterForCookieChangedNotification(); | 70 void RegisterForCookieChangedNotification(); |
71 void UnregisterForCookieChangedNotification(); | 71 void UnregisterForCookieChangedNotification(); |
72 | 72 |
73 Profile* profile_; | 73 Profile* profile_; |
74 content::NotificationRegistrar registrar_; | 74 content::NotificationRegistrar registrar_; |
75 | 75 |
76 // The callback that if non-empty will be called when notifications about | 76 // The callbacks that will be called when notifications about cookie changes |
77 // cookie changes are received. | 77 // are received. |
78 CookieChangedCallback callback_; | 78 base::CallbackList<void(const net::CanonicalCookie* cookie)> callbacks_; |
79 | 79 |
80 // See SetSigninProcess. Tracks the currently active signin process | 80 // See SetSigninProcess. Tracks the currently active signin process |
81 // by ID, if there is one. | 81 // by ID, if there is one. |
82 int signin_host_id_; | 82 int signin_host_id_; |
83 | 83 |
84 // The RenderProcessHosts being observed. | 84 // The RenderProcessHosts being observed. |
85 std::set<content::RenderProcessHost*> signin_hosts_observed_; | 85 std::set<content::RenderProcessHost*> signin_hosts_observed_; |
86 | 86 |
87 DISALLOW_COPY_AND_ASSIGN(ChromeSigninClient); | 87 DISALLOW_COPY_AND_ASSIGN(ChromeSigninClient); |
88 }; | 88 }; |
89 | 89 |
90 #endif // CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ | 90 #endif // CHROME_BROWSER_SIGNIN_CHROME_SIGNIN_CLIENT_H_ |
OLD | NEW |