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

Side by Side Diff: chrome/browser/extensions/api/gcm/gcm_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_GCM_GCM_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_GCM_GCM_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_GCM_GCM_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_GCM_GCM_API_H_
7 7
8 #include "chrome/common/extensions/api/gcm.h" 8 #include "chrome/common/extensions/api/gcm.h"
9 #include "extensions/browser/event_router.h" 9 #include "extensions/browser/event_router.h"
10 #include "extensions/browser/extension_function.h" 10 #include "extensions/browser/extension_function.h"
11 #include "google_apis/gcm/gcm_client.h" 11 #include "google_apis/gcm/gcm_client.h"
12 12
13 namespace gcm { 13 namespace gcm {
14 class GCMProfileService; 14 class GCMProfileService;
15 } // namespace gcm 15 } // namespace gcm
16 16
17 class Profile; 17 class Profile;
18 18
19 namespace extensions { 19 namespace extensions {
20 20
21 class GcmApiFunction : public AsyncExtensionFunction { 21 class GcmApiFunction : public AsyncExtensionFunction {
22 public: 22 public:
23 GcmApiFunction() {} 23 GcmApiFunction() {}
24 24
25 protected: 25 protected:
26 virtual ~GcmApiFunction() {} 26 virtual ~GcmApiFunction() {}
27 27
28 // ExtensionFunction: 28 // ExtensionFunction:
29 virtual bool RunImpl() OVERRIDE FINAL; 29 virtual bool RunAsync() OVERRIDE FINAL;
30 30
31 // Actual implementation of specific functions. 31 // Actual implementation of specific functions.
32 virtual bool DoWork() = 0; 32 virtual bool DoWork() = 0;
33 33
34 // Checks that the GCM API is enabled. 34 // Checks that the GCM API is enabled.
35 bool IsGcmApiEnabled() const; 35 bool IsGcmApiEnabled() const;
36 36
37 gcm::GCMProfileService* GCMProfileService() const; 37 gcm::GCMProfileService* GCMProfileService() const;
38 }; 38 };
39 39
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 108
109 private: 109 private:
110 // The application we route the event to is running in context of the 110 // The application we route the event to is running in context of the
111 // |profile_| and the latter outlives the event router. 111 // |profile_| and the latter outlives the event router.
112 Profile* profile_; 112 Profile* profile_;
113 }; 113 };
114 114
115 } // namespace extensions 115 } // namespace extensions
116 116
117 #endif // CHROME_BROWSER_EXTENSIONS_API_GCM_GCM_API_H_ 117 #endif // CHROME_BROWSER_EXTENSIONS_API_GCM_GCM_API_H_
OLDNEW
« no previous file with comments | « chrome/browser/extensions/api/font_settings/font_settings_api.cc ('k') | chrome/browser/extensions/api/gcm/gcm_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698