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

Unified Diff: extensions/browser/api/runtime/runtime_api.h

Issue 936123002: [Extensions] Implement chrome.runtime.openOptionsPage. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: default impl 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
Index: extensions/browser/api/runtime/runtime_api.h
diff --git a/extensions/browser/api/runtime/runtime_api.h b/extensions/browser/api/runtime/runtime_api.h
index e330521985518133218c86bdf3f05577f0db1f2a..901bab4a0a835f5f2808c80763b9baaca5f04d82 100644
--- a/extensions/browser/api/runtime/runtime_api.h
+++ b/extensions/browser/api/runtime/runtime_api.h
@@ -64,6 +64,7 @@ class RuntimeAPI : public BrowserContextKeyedAPI,
void OpenURL(const GURL& uninstall_url);
bool GetPlatformInfo(core_api::runtime::PlatformInfo* info);
bool RestartDevice(std::string* error_message);
+ bool OpenOptionsPage(const Extension* extension);
private:
friend class BrowserContextKeyedAPIFactory<RuntimeAPI>;
@@ -162,6 +163,15 @@ class RuntimeGetBackgroundPageFunction : public UIThreadExtensionFunction {
void OnPageLoaded(ExtensionHost*);
};
+class RuntimeOpenOptionsPageFunction : public UIThreadExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("runtime.openOptionsPage", RUNTIME_OPENOPTIONSPAGE)
+
+ protected:
+ ~RuntimeOpenOptionsPageFunction() override {}
+ ResponseAction Run() override;
+};
+
class RuntimeSetUninstallURLFunction : public UIThreadExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("runtime.setUninstallURL", RUNTIME_SETUNINSTALLURL)

Powered by Google App Engine
This is Rietveld 408576698