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_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 | 9 |
10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 DECLARE_EXTENSION_FUNCTION("autotestPrivate.getVisibleNotifications", | 165 DECLARE_EXTENSION_FUNCTION("autotestPrivate.getVisibleNotifications", |
166 AUTOTESTPRIVATE_GETVISIBLENOTIFICATIONS) | 166 AUTOTESTPRIVATE_GETVISIBLENOTIFICATIONS) |
167 | 167 |
168 private: | 168 private: |
169 static std::string ConvertToString(message_center::NotificationType type); | 169 static std::string ConvertToString(message_center::NotificationType type); |
170 | 170 |
171 ~AutotestPrivateGetVisibleNotificationsFunction() override {} | 171 ~AutotestPrivateGetVisibleNotificationsFunction() override {} |
172 ResponseAction Run() override; | 172 ResponseAction Run() override; |
173 }; | 173 }; |
174 | 174 |
| 175 class AutotestPrivateGetPlayStoreStateFunction |
| 176 : public UIThreadExtensionFunction { |
| 177 public: |
| 178 DECLARE_EXTENSION_FUNCTION("autotestPrivate.getPlayStoreState", |
| 179 AUTOTESTPRIVATE_GETPLAYSTORESTATE) |
| 180 |
| 181 private: |
| 182 ~AutotestPrivateGetPlayStoreStateFunction() override {} |
| 183 ResponseAction Run() override; |
| 184 }; |
| 185 |
| 186 class AutotestPrivateSetPlayStoreEnabledFunction |
| 187 : public UIThreadExtensionFunction { |
| 188 public: |
| 189 DECLARE_EXTENSION_FUNCTION("autotestPrivate.setPlayStoreEnabled", |
| 190 AUTOTESTPRIVATE_SETPLAYSTOREENABLED) |
| 191 |
| 192 private: |
| 193 ~AutotestPrivateSetPlayStoreEnabledFunction() override {} |
| 194 ResponseAction Run() override; |
| 195 }; |
| 196 |
175 // Don't kill the browser when we're in a browser test. | 197 // Don't kill the browser when we're in a browser test. |
176 void SetAutotestPrivateTest(); | 198 void SetAutotestPrivateTest(); |
177 | 199 |
178 // The profile-keyed service that manages the autotestPrivate extension API. | 200 // The profile-keyed service that manages the autotestPrivate extension API. |
179 class AutotestPrivateAPI : public BrowserContextKeyedAPI { | 201 class AutotestPrivateAPI : public BrowserContextKeyedAPI { |
180 public: | 202 public: |
181 static BrowserContextKeyedAPIFactory<AutotestPrivateAPI>* | 203 static BrowserContextKeyedAPIFactory<AutotestPrivateAPI>* |
182 GetFactoryInstance(); | 204 GetFactoryInstance(); |
183 | 205 |
184 // TODO(achuith): Replace these with a mock object for system calls. | 206 // TODO(achuith): Replace these with a mock object for system calls. |
(...skipping 15 matching lines...) Expand all Loading... |
200 }; | 222 }; |
201 | 223 |
202 template <> | 224 template <> |
203 KeyedService* | 225 KeyedService* |
204 BrowserContextKeyedAPIFactory<AutotestPrivateAPI>::BuildServiceInstanceFor( | 226 BrowserContextKeyedAPIFactory<AutotestPrivateAPI>::BuildServiceInstanceFor( |
205 content::BrowserContext* context) const; | 227 content::BrowserContext* context) const; |
206 | 228 |
207 } // namespace extensions | 229 } // namespace extensions |
208 | 230 |
209 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H
_ | 231 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H
_ |
OLD | NEW |