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

Side by Side Diff: chrome/browser/extensions/api/developer_private/developer_private_api.h

Issue 954943007: [Extensions] Make chrome://extensions use api functions for file access, reload (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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
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_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API_H_
7 7
8 #include <set> 8 #include <set>
9 9
10 #include "base/files/file.h" 10 #include "base/files/file.h"
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
221 DEVELOPERPRIVATE_INSPECT) 221 DEVELOPERPRIVATE_INSPECT)
222 222
223 protected: 223 protected:
224 ~DeveloperPrivateInspectFunction() override; 224 ~DeveloperPrivateInspectFunction() override;
225 225
226 // ExtensionFunction: 226 // ExtensionFunction:
227 bool RunSync() override; 227 bool RunSync() override;
228 }; 228 };
229 229
230 class DeveloperPrivateAllowFileAccessFunction 230 class DeveloperPrivateAllowFileAccessFunction
231 : public ChromeSyncExtensionFunction { 231 : public UIThreadExtensionFunction {
232 public: 232 public:
233 DECLARE_EXTENSION_FUNCTION("developerPrivate.allowFileAccess", 233 DECLARE_EXTENSION_FUNCTION("developerPrivate.allowFileAccess",
234 DEVELOPERPRIVATE_ALLOWFILEACCESS); 234 DEVELOPERPRIVATE_ALLOWFILEACCESS);
235 235
236 protected: 236 protected:
237 ~DeveloperPrivateAllowFileAccessFunction() override; 237 ~DeveloperPrivateAllowFileAccessFunction() override;
238 238
239 // ExtensionFunction: 239 // ExtensionFunction:
240 bool RunSync() override; 240 ResponseAction Run() override;
241 }; 241 };
242 242
243 class DeveloperPrivateAllowIncognitoFunction 243 class DeveloperPrivateAllowIncognitoFunction
244 : public UIThreadExtensionFunction { 244 : public UIThreadExtensionFunction {
245 public: 245 public:
246 DECLARE_EXTENSION_FUNCTION("developerPrivate.allowIncognito", 246 DECLARE_EXTENSION_FUNCTION("developerPrivate.allowIncognito",
247 DEVELOPERPRIVATE_ALLOWINCOGNITO); 247 DEVELOPERPRIVATE_ALLOWINCOGNITO);
248 248
249 protected: 249 protected:
250 ~DeveloperPrivateAllowIncognitoFunction() override; 250 ~DeveloperPrivateAllowIncognitoFunction() override;
251 251
252 // UIThreadExtensionFunction: 252 // UIThreadExtensionFunction:
253 ResponseAction Run() override; 253 ResponseAction Run() override;
254 }; 254 };
255 255
256 class DeveloperPrivateReloadFunction : public ChromeSyncExtensionFunction { 256 class DeveloperPrivateReloadFunction : public UIThreadExtensionFunction {
257 public: 257 public:
258 DECLARE_EXTENSION_FUNCTION("developerPrivate.reload", 258 DECLARE_EXTENSION_FUNCTION("developerPrivate.reload",
259 DEVELOPERPRIVATE_RELOAD); 259 DEVELOPERPRIVATE_RELOAD);
260 260
261 protected: 261 protected:
262 ~DeveloperPrivateReloadFunction() override; 262 ~DeveloperPrivateReloadFunction() override;
263 263
264 // ExtensionFunction: 264 // ExtensionFunction:
265 bool RunSync() override; 265 ResponseAction Run() override;
266 }; 266 };
267 267
268 class DeveloperPrivateShowPermissionsDialogFunction 268 class DeveloperPrivateShowPermissionsDialogFunction
269 : public ChromeSyncExtensionFunction, 269 : public ChromeSyncExtensionFunction,
270 public ExtensionInstallPrompt::Delegate { 270 public ExtensionInstallPrompt::Delegate {
271 public: 271 public:
272 DECLARE_EXTENSION_FUNCTION("developerPrivate.showPermissionsDialog", 272 DECLARE_EXTENSION_FUNCTION("developerPrivate.showPermissionsDialog",
273 DEVELOPERPRIVATE_PERMISSIONS); 273 DEVELOPERPRIVATE_PERMISSIONS);
274 274
275 DeveloperPrivateShowPermissionsDialogFunction(); 275 DeveloperPrivateShowPermissionsDialogFunction();
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 483
484 // ExtensionFunction: 484 // ExtensionFunction:
485 bool RunAsync() override; 485 bool RunAsync() override;
486 }; 486 };
487 487
488 } // namespace api 488 } // namespace api
489 489
490 } // namespace extensions 490 } // namespace extensions
491 491
492 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_ 492 #endif // CHROME_BROWSER_EXTENSIONS_API_DEVELOPER_PRIVATE_DEVELOPER_PRIVATE_API _H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698