| 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 AutotestPrivateIsPlayStoreEnabledFunction |
| 176 : public UIThreadExtensionFunction { |
| 177 public: |
| 178 DECLARE_EXTENSION_FUNCTION("autotestPrivate.isPlayStoreEnabled", |
| 179 AUTOTESTPRIVATE_ISPLAYSTOREENABLED) |
| 180 |
| 181 private: |
| 182 ~AutotestPrivateIsPlayStoreEnabledFunction() override {} |
| 183 ResponseAction Run() override; |
| 184 }; |
| 185 |
| 186 class AutotestPrivateIsPlayStoreManagedFunction |
| 187 : public UIThreadExtensionFunction { |
| 188 public: |
| 189 DECLARE_EXTENSION_FUNCTION("autotestPrivate.isPlayStoreManaged", |
| 190 AUTOTESTPRIVATE_ISPLAYSTOREMANAGED) |
| 191 |
| 192 private: |
| 193 ~AutotestPrivateIsPlayStoreManagedFunction() override {} |
| 194 ResponseAction Run() override; |
| 195 }; |
| 196 |
| 197 class AutotestPrivateSetPlayStoreEnabledFunction |
| 198 : public UIThreadExtensionFunction { |
| 199 public: |
| 200 DECLARE_EXTENSION_FUNCTION("autotestPrivate.setPlayStoreEnabled", |
| 201 AUTOTESTPRIVATE_SETPLAYSTOREENABLED) |
| 202 |
| 203 private: |
| 204 ~AutotestPrivateSetPlayStoreEnabledFunction() override {} |
| 205 ResponseAction Run() override; |
| 206 }; |
| 207 |
| 175 // Don't kill the browser when we're in a browser test. | 208 // Don't kill the browser when we're in a browser test. |
| 176 void SetAutotestPrivateTest(); | 209 void SetAutotestPrivateTest(); |
| 177 | 210 |
| 178 // The profile-keyed service that manages the autotestPrivate extension API. | 211 // The profile-keyed service that manages the autotestPrivate extension API. |
| 179 class AutotestPrivateAPI : public BrowserContextKeyedAPI { | 212 class AutotestPrivateAPI : public BrowserContextKeyedAPI { |
| 180 public: | 213 public: |
| 181 static BrowserContextKeyedAPIFactory<AutotestPrivateAPI>* | 214 static BrowserContextKeyedAPIFactory<AutotestPrivateAPI>* |
| 182 GetFactoryInstance(); | 215 GetFactoryInstance(); |
| 183 | 216 |
| 184 // TODO(achuith): Replace these with a mock object for system calls. | 217 // TODO(achuith): Replace these with a mock object for system calls. |
| (...skipping 15 matching lines...) Expand all Loading... |
| 200 }; | 233 }; |
| 201 | 234 |
| 202 template <> | 235 template <> |
| 203 KeyedService* | 236 KeyedService* |
| 204 BrowserContextKeyedAPIFactory<AutotestPrivateAPI>::BuildServiceInstanceFor( | 237 BrowserContextKeyedAPIFactory<AutotestPrivateAPI>::BuildServiceInstanceFor( |
| 205 content::BrowserContext* context) const; | 238 content::BrowserContext* context) const; |
| 206 | 239 |
| 207 } // namespace extensions | 240 } // namespace extensions |
| 208 | 241 |
| 209 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H
_ | 242 #endif // CHROME_BROWSER_EXTENSIONS_API_AUTOTEST_PRIVATE_AUTOTEST_PRIVATE_API_H
_ |
| OLD | NEW |