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 37483df9e0a1c09c9b74057999f9cb005b590faa..39697f97b6763b11b8d3420d2bfd479dd16482f4 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 |
@@ -115,6 +115,48 @@ class WebViewInternalInsertCSSFunction |
DISALLOW_COPY_AND_ASSIGN(WebViewInternalInsertCSSFunction); |
}; |
+class WebViewInternalAddContentScriptsFunction : public AsyncExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("webViewInternal.addContentScripts", |
+ WEBVIEWINTERNAL_ADDCONTENTSCRIPTS); |
+ |
+ WebViewInternalAddContentScriptsFunction(); |
+ |
+ const HostID& host_id() const { return host_id_; } |
+ void set_host_id(HostID host_id) { host_id_ = host_id; } |
+ |
+ protected: |
+ ~WebViewInternalAddContentScriptsFunction() override; |
+ |
+ private: |
+ bool RunAsync() override; |
+ |
+ // The ID of the injection host. |
+ HostID host_id_; |
+ |
+ // The instance ID of the <*view> element. |
+ int guest_view_instance_id_; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(WebViewInternalAddContentScriptsFunction); |
+}; |
+ |
+class WebViewInternalRemoveContentScriptsFunction |
+ : public AsyncExtensionFunction { |
+ public: |
+ DECLARE_EXTENSION_FUNCTION("webViewInternal.removeContentScripts", |
+ WEBVIEWINTERNAL_REMOVECONTENTSCRIPTS); |
+ |
+ WebViewInternalRemoveContentScriptsFunction(); |
+ |
+ protected: |
+ ~WebViewInternalRemoveContentScriptsFunction() override; |
+ |
+ private: |
+ bool RunAsync() override; |
+ |
+ DISALLOW_COPY_AND_ASSIGN(WebViewInternalRemoveContentScriptsFunction); |
+}; |
+ |
class WebViewInternalSetNameFunction : public WebViewInternalExtensionFunction { |
public: |
DECLARE_EXTENSION_FUNCTION("webViewInternal.setName", |