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_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR
IVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR
IVATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR
IVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES_PR
IVATE_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 class MediaGalleriesPrivateAddGalleryWatchFunction | 81 class MediaGalleriesPrivateAddGalleryWatchFunction |
82 : public ChromeAsyncExtensionFunction { | 82 : public ChromeAsyncExtensionFunction { |
83 public: | 83 public: |
84 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.addGalleryWatch", | 84 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.addGalleryWatch", |
85 MEDIAGALLERIESPRIVATE_ADDGALLERYWATCH); | 85 MEDIAGALLERIESPRIVATE_ADDGALLERYWATCH); |
86 | 86 |
87 protected: | 87 protected: |
88 virtual ~MediaGalleriesPrivateAddGalleryWatchFunction(); | 88 virtual ~MediaGalleriesPrivateAddGalleryWatchFunction(); |
89 | 89 |
90 // AsyncExtensionFunction overrides. | 90 // AsyncExtensionFunction overrides. |
91 virtual bool RunImpl() OVERRIDE; | 91 virtual bool RunAsync() OVERRIDE; |
92 | 92 |
93 private: | 93 private: |
94 void OnPreferencesInit(const std::string& pref_id); | 94 void OnPreferencesInit(const std::string& pref_id); |
95 | 95 |
96 // Gallery watch request handler. | 96 // Gallery watch request handler. |
97 void HandleResponse(MediaGalleryPrefId gallery_id, bool success); | 97 void HandleResponse(MediaGalleryPrefId gallery_id, bool success); |
98 }; | 98 }; |
99 | 99 |
100 // Implements the chrome.mediaGalleriesPrivate.removeGalleryWatch method. | 100 // Implements the chrome.mediaGalleriesPrivate.removeGalleryWatch method. |
101 class MediaGalleriesPrivateRemoveGalleryWatchFunction | 101 class MediaGalleriesPrivateRemoveGalleryWatchFunction |
102 : public ChromeAsyncExtensionFunction { | 102 : public ChromeAsyncExtensionFunction { |
103 public: | 103 public: |
104 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeGalleryWatch", | 104 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeGalleryWatch", |
105 MEDIAGALLERIESPRIVATE_REMOVEGALLERYWATCH); | 105 MEDIAGALLERIESPRIVATE_REMOVEGALLERYWATCH); |
106 | 106 |
107 protected: | 107 protected: |
108 virtual ~MediaGalleriesPrivateRemoveGalleryWatchFunction(); | 108 virtual ~MediaGalleriesPrivateRemoveGalleryWatchFunction(); |
109 | 109 |
110 // SyncExtensionFunction overrides. | 110 // SyncExtensionFunction overrides. |
111 virtual bool RunImpl() OVERRIDE; | 111 virtual bool RunAsync() OVERRIDE; |
112 | 112 |
113 private: | 113 private: |
114 void OnPreferencesInit(const std::string& pref_id); | 114 void OnPreferencesInit(const std::string& pref_id); |
115 }; | 115 }; |
116 | 116 |
117 // Implements the chrome.mediaGalleriesPrivate.getAllGalleryWatch method. | 117 // Implements the chrome.mediaGalleriesPrivate.getAllGalleryWatch method. |
118 class MediaGalleriesPrivateGetAllGalleryWatchFunction | 118 class MediaGalleriesPrivateGetAllGalleryWatchFunction |
119 : public ChromeAsyncExtensionFunction { | 119 : public ChromeAsyncExtensionFunction { |
120 public: | 120 public: |
121 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.getAllGalleryWatch", | 121 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.getAllGalleryWatch", |
122 MEDIAGALLERIESPRIVATE_GETALLGALLERYWATCH); | 122 MEDIAGALLERIESPRIVATE_GETALLGALLERYWATCH); |
123 protected: | 123 protected: |
124 virtual ~MediaGalleriesPrivateGetAllGalleryWatchFunction(); | 124 virtual ~MediaGalleriesPrivateGetAllGalleryWatchFunction(); |
125 | 125 |
126 // SyncExtensionFunction overrides. | 126 // SyncExtensionFunction overrides. |
127 virtual bool RunImpl() OVERRIDE; | 127 virtual bool RunAsync() OVERRIDE; |
128 | 128 |
129 private: | 129 private: |
130 void OnPreferencesInit(); | 130 void OnPreferencesInit(); |
131 }; | 131 }; |
132 | 132 |
133 // Implements the chrome.mediaGalleriesPrivate.removeAllGalleryWatch method. | 133 // Implements the chrome.mediaGalleriesPrivate.removeAllGalleryWatch method. |
134 class MediaGalleriesPrivateRemoveAllGalleryWatchFunction | 134 class MediaGalleriesPrivateRemoveAllGalleryWatchFunction |
135 : public ChromeAsyncExtensionFunction { | 135 : public ChromeAsyncExtensionFunction { |
136 public: | 136 public: |
137 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeAllGalleryWatch", | 137 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.removeAllGalleryWatch", |
138 MEDIAGALLERIESPRIVATE_REMOVEALLGALLERYWATCH); | 138 MEDIAGALLERIESPRIVATE_REMOVEALLGALLERYWATCH); |
139 protected: | 139 protected: |
140 virtual ~MediaGalleriesPrivateRemoveAllGalleryWatchFunction(); | 140 virtual ~MediaGalleriesPrivateRemoveAllGalleryWatchFunction(); |
141 | 141 |
142 // SyncExtensionFunction overrides. | 142 // SyncExtensionFunction overrides. |
143 virtual bool RunImpl() OVERRIDE; | 143 virtual bool RunAsync() OVERRIDE; |
144 | 144 |
145 private: | 145 private: |
146 void OnPreferencesInit(); | 146 void OnPreferencesInit(); |
147 }; | 147 }; |
148 | 148 |
149 // Implements the chrome.mediaGalleriesPrivate.getHandlers method. | 149 // Implements the chrome.mediaGalleriesPrivate.getHandlers method. |
150 class MediaGalleriesPrivateGetHandlersFunction | 150 class MediaGalleriesPrivateGetHandlersFunction |
151 : public ChromeAsyncExtensionFunction { | 151 : public ChromeAsyncExtensionFunction { |
152 public: | 152 public: |
153 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.getHandlers", | 153 DECLARE_EXTENSION_FUNCTION("mediaGalleriesPrivate.getHandlers", |
154 MEDIAGALLERIESPRIVATE_GETHANDLERS); | 154 MEDIAGALLERIESPRIVATE_GETHANDLERS); |
155 | 155 |
156 protected: | 156 protected: |
157 virtual ~MediaGalleriesPrivateGetHandlersFunction(); | 157 virtual ~MediaGalleriesPrivateGetHandlersFunction(); |
158 | 158 |
159 // AsyncExtensionFunction overrides. | 159 // AsyncExtensionFunction overrides. |
160 virtual bool RunImpl() OVERRIDE; | 160 virtual bool RunAsync() OVERRIDE; |
161 }; | 161 }; |
162 | 162 |
163 } // namespace extensions | 163 } // namespace extensions |
164 | 164 |
165 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES
_PRIVATE_API_H_ | 165 #endif // CHROME_BROWSER_EXTENSIONS_API_MEDIA_GALLERIES_PRIVATE_MEDIA_GALLERIES
_PRIVATE_API_H_ |
OLD | NEW |