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_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ |
6 #define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ | 6 #define CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 bool IsUserLoggedIn() const; | 84 bool IsUserLoggedIn() const; |
85 | 85 |
86 // ObfuscatedGiaiaIdFetcher::Delegate implementation. | 86 // ObfuscatedGiaiaIdFetcher::Delegate implementation. |
87 virtual void OnObfuscatedGaiaIdFetchSuccess(const std::string& gaia_id) | 87 virtual void OnObfuscatedGaiaIdFetchSuccess(const std::string& gaia_id) |
88 OVERRIDE; | 88 OVERRIDE; |
89 virtual void OnObfuscatedGaiaIdFetchFailure( | 89 virtual void OnObfuscatedGaiaIdFetchFailure( |
90 const GoogleServiceAuthError& error) OVERRIDE; | 90 const GoogleServiceAuthError& error) OVERRIDE; |
91 scoped_ptr<ObfuscatedGaiaIdFetcher> fetcher_; | 91 scoped_ptr<ObfuscatedGaiaIdFetcher> fetcher_; |
92 bool interactive_; | 92 bool interactive_; |
93 | 93 |
94 // We use this to register for notifications if the logon attept succeeds. | 94 // We use this to register for notifications if the login attempt succeeds. |
95 content::NotificationRegistrar registrar_; | 95 content::NotificationRegistrar registrar_; |
96 | 96 |
97 DISALLOW_COPY_AND_ASSIGN(PushMessagingGetChannelIdFunction); | 97 DISALLOW_COPY_AND_ASSIGN(PushMessagingGetChannelIdFunction); |
98 }; | 98 }; |
99 | 99 |
100 class PushMessagingAPI : public ProfileKeyedAPI, | 100 class PushMessagingAPI : public ProfileKeyedAPI, |
101 public content::NotificationObserver { | 101 public content::NotificationObserver { |
102 public: | 102 public: |
103 explicit PushMessagingAPI(Profile* profile); | 103 explicit PushMessagingAPI(Profile* profile); |
104 virtual ~PushMessagingAPI(); | 104 virtual ~PushMessagingAPI(); |
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
146 | 146 |
147 DISALLOW_COPY_AND_ASSIGN(PushMessagingAPI); | 147 DISALLOW_COPY_AND_ASSIGN(PushMessagingAPI); |
148 }; | 148 }; |
149 | 149 |
150 template <> | 150 template <> |
151 void ProfileKeyedAPIFactory<PushMessagingAPI>::DeclareFactoryDependencies(); | 151 void ProfileKeyedAPIFactory<PushMessagingAPI>::DeclareFactoryDependencies(); |
152 | 152 |
153 } // namespace extensions | 153 } // namespace extensions |
154 | 154 |
155 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ | 155 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ |
OLD | NEW |