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

Unified Diff: extensions/browser/api/guest_view/web_view/web_view_internal_api.h

Issue 959413003: Implement <webview>.addContentScript/removeContentScript API [1] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 8 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/guest_view/web_view/web_view_internal_api.h
diff --git a/extensions/browser/api/guest_view/web_view/web_view_internal_api.h b/extensions/browser/api/guest_view/web_view/web_view_internal_api.h
index 650d530bcb553a97d6476493be03716babc6502b..373abcec8b54d33ca47859397732fd8b18391b97 100644
--- a/extensions/browser/api/guest_view/web_view/web_view_internal_api.h
+++ b/extensions/browser/api/guest_view/web_view/web_view_internal_api.h
@@ -129,6 +129,40 @@ class WebViewInternalInsertCSSFunction
DISALLOW_COPY_AND_ASSIGN(WebViewInternalInsertCSSFunction);
};
+class WebViewInternalAddContentScriptsFunction
+ : public UIThreadExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("webViewInternal.addContentScripts",
+ WEBVIEWINTERNAL_ADDCONTENTSCRIPTS);
+
+ WebViewInternalAddContentScriptsFunction();
+
+ protected:
+ ~WebViewInternalAddContentScriptsFunction() override;
+
+ private:
+ ExecuteCodeFunction::ResponseAction Run() override;
+
+ DISALLOW_COPY_AND_ASSIGN(WebViewInternalAddContentScriptsFunction);
+};
+
+class WebViewInternalRemoveContentScriptsFunction
+ : public UIThreadExtensionFunction {
+ public:
+ DECLARE_EXTENSION_FUNCTION("webViewInternal.removeContentScripts",
+ WEBVIEWINTERNAL_REMOVECONTENTSCRIPTS);
+
+ WebViewInternalRemoveContentScriptsFunction();
+
+ protected:
+ ~WebViewInternalRemoveContentScriptsFunction() override;
+
+ private:
+ ExecuteCodeFunction::ResponseAction Run() override;
+
+ DISALLOW_COPY_AND_ASSIGN(WebViewInternalRemoveContentScriptsFunction);
+};
+
class WebViewInternalSetNameFunction : public WebViewInternalExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("webViewInternal.setName",

Powered by Google App Engine
This is Rietveld 408576698