Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1058)

Side by Side Diff: chrome/browser/extensions/api/push_messaging/push_messaging_api.h

Issue 257333002: Drive extension functions from ExtensionFunction::Run. The (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix comment Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 public ObfuscatedGaiaIdFetcher::Delegate, 59 public ObfuscatedGaiaIdFetcher::Delegate,
60 public OAuth2TokenService::Observer, 60 public OAuth2TokenService::Observer,
61 public OAuth2TokenService::Consumer { 61 public OAuth2TokenService::Consumer {
62 public: 62 public:
63 PushMessagingGetChannelIdFunction(); 63 PushMessagingGetChannelIdFunction();
64 64
65 protected: 65 protected:
66 virtual ~PushMessagingGetChannelIdFunction(); 66 virtual ~PushMessagingGetChannelIdFunction();
67 67
68 // ExtensionFunction: 68 // ExtensionFunction:
69 virtual bool RunImpl() OVERRIDE; 69 virtual bool RunAsync() OVERRIDE;
70 DECLARE_EXTENSION_FUNCTION("pushMessaging.getChannelId", 70 DECLARE_EXTENSION_FUNCTION("pushMessaging.getChannelId",
71 PUSHMESSAGING_GETCHANNELID) 71 PUSHMESSAGING_GETCHANNELID)
72 72
73 private: 73 private:
74 void ReportResult(const std::string& gaia_id, 74 void ReportResult(const std::string& gaia_id,
75 const std::string& error_message); 75 const std::string& error_message);
76 76
77 void BuildAndSendResult(const std::string& gaia_id, 77 void BuildAndSendResult(const std::string& gaia_id,
78 const std::string& error_message); 78 const std::string& error_message);
79 79
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after
158 DISALLOW_COPY_AND_ASSIGN(PushMessagingAPI); 158 DISALLOW_COPY_AND_ASSIGN(PushMessagingAPI);
159 }; 159 };
160 160
161 template <> 161 template <>
162 void BrowserContextKeyedAPIFactory< 162 void BrowserContextKeyedAPIFactory<
163 PushMessagingAPI>::DeclareFactoryDependencies(); 163 PushMessagingAPI>::DeclareFactoryDependencies();
164 164
165 } // namespace extensions 165 } // namespace extensions
166 166
167 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__ 167 #endif // CHROME_BROWSER_EXTENSIONS_API_PUSH_MESSAGING_PUSH_MESSAGING_API_H__
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698