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

Unified 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/extensions/api/developer_private/developer_private_api.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/api/developer_private/developer_private_api.h
diff --git a/chrome/browser/extensions/api/developer_private/developer_private_api.h b/chrome/browser/extensions/api/developer_private/developer_private_api.h
index cb5121a1cc87b498fad9c98dfa818143d9c0d353..2164d14c178927295a7930f2aeade63e60abb151 100644
--- a/chrome/browser/extensions/api/developer_private/developer_private_api.h
+++ b/chrome/browser/extensions/api/developer_private/developer_private_api.h
@@ -162,6 +162,15 @@ class DeveloperPrivateAPI : public BrowserContextKeyedAPI,
namespace api {
+class DeveloperPrivateAPIFunction : public UIThreadExtensionFunction {
+ protected:
+ ~DeveloperPrivateAPIFunction() override;
+
+ // Returns the extension with the given |id| from the registry, including
+ // all possible extensions (enabled, disabled, terminated, etc).
+ const Extension* GetExtensionById(const std::string& id);
+};
+
class DeveloperPrivateAutoUpdateFunction : public ChromeSyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("developerPrivate.autoUpdate",
@@ -228,7 +237,7 @@ class DeveloperPrivateInspectFunction : public ChromeSyncExtensionFunction {
};
class DeveloperPrivateAllowFileAccessFunction
- : public ChromeSyncExtensionFunction {
+ : public DeveloperPrivateAPIFunction {
public:
DECLARE_EXTENSION_FUNCTION("developerPrivate.allowFileAccess",
DEVELOPERPRIVATE_ALLOWFILEACCESS);
@@ -237,11 +246,11 @@ class DeveloperPrivateAllowFileAccessFunction
~DeveloperPrivateAllowFileAccessFunction() override;
// ExtensionFunction:
- bool RunSync() override;
+ ResponseAction Run() override;
};
class DeveloperPrivateAllowIncognitoFunction
- : public UIThreadExtensionFunction {
+ : public DeveloperPrivateAPIFunction {
public:
DECLARE_EXTENSION_FUNCTION("developerPrivate.allowIncognito",
DEVELOPERPRIVATE_ALLOWINCOGNITO);
@@ -253,7 +262,7 @@ class DeveloperPrivateAllowIncognitoFunction
ResponseAction Run() override;
};
-class DeveloperPrivateReloadFunction : public ChromeSyncExtensionFunction {
+class DeveloperPrivateReloadFunction : public DeveloperPrivateAPIFunction {
public:
DECLARE_EXTENSION_FUNCTION("developerPrivate.reload",
DEVELOPERPRIVATE_RELOAD);
@@ -262,7 +271,7 @@ class DeveloperPrivateReloadFunction : public ChromeSyncExtensionFunction {
~DeveloperPrivateReloadFunction() override;
// ExtensionFunction:
- bool RunSync() override;
+ ResponseAction Run() override;
};
class DeveloperPrivateShowPermissionsDialogFunction
« no previous file with comments | « no previous file | chrome/browser/extensions/api/developer_private/developer_private_api.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698