OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 EXTENSIONS_BROWSER_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ |
6 #define EXTENSIONS_BROWSER_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ | 6 #define EXTENSIONS_BROWSER_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ |
7 | 7 |
8 #include "extensions/browser/api/capture_web_contents_function.h" | 8 #include "extensions/browser/api/capture_web_contents_function.h" |
9 #include "extensions/browser/api/execute_code_function.h" | 9 #include "extensions/browser/api/execute_code_function.h" |
10 #include "extensions/browser/extension_function.h" | 10 #include "extensions/browser/extension_function.h" |
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 bool ShouldInsertCSS() const override; | 109 bool ShouldInsertCSS() const override; |
110 | 110 |
111 DECLARE_EXTENSION_FUNCTION("webViewInternal.insertCSS", | 111 DECLARE_EXTENSION_FUNCTION("webViewInternal.insertCSS", |
112 WEBVIEWINTERNAL_INSERTCSS) | 112 WEBVIEWINTERNAL_INSERTCSS) |
113 | 113 |
114 private: | 114 private: |
115 DISALLOW_COPY_AND_ASSIGN(WebViewInternalInsertCSSFunction); | 115 DISALLOW_COPY_AND_ASSIGN(WebViewInternalInsertCSSFunction); |
116 }; | 116 }; |
117 | 117 |
| 118 class WebViewInternalAddContentScriptsFunction |
| 119 : public WebViewInternalExtensionFunction { |
| 120 public: |
| 121 DECLARE_EXTENSION_FUNCTION("webViewInternal.addContentScripts", |
| 122 WEBVIEWINTERNAL_ADDCONTENTSCRIPTS); |
| 123 |
| 124 WebViewInternalAddContentScriptsFunction(); |
| 125 |
| 126 protected: |
| 127 ~WebViewInternalAddContentScriptsFunction() override; |
| 128 |
| 129 private: |
| 130 bool RunAsyncSafe(WebViewGuest* guest) override; |
| 131 |
| 132 DISALLOW_COPY_AND_ASSIGN(WebViewInternalAddContentScriptsFunction); |
| 133 }; |
| 134 |
| 135 class WebViewInternalRemoveContentScriptsFunction |
| 136 : public WebViewInternalExtensionFunction { |
| 137 public: |
| 138 DECLARE_EXTENSION_FUNCTION("webViewInternal.removeContentScripts", |
| 139 WEBVIEWINTERNAL_REMOVECONTENTSCRIPTS); |
| 140 |
| 141 WebViewInternalRemoveContentScriptsFunction(); |
| 142 |
| 143 protected: |
| 144 ~WebViewInternalRemoveContentScriptsFunction() override; |
| 145 |
| 146 private: |
| 147 bool RunAsyncSafe(WebViewGuest* guest) override; |
| 148 |
| 149 DISALLOW_COPY_AND_ASSIGN(WebViewInternalRemoveContentScriptsFunction); |
| 150 }; |
| 151 |
118 class WebViewInternalSetNameFunction : public WebViewInternalExtensionFunction { | 152 class WebViewInternalSetNameFunction : public WebViewInternalExtensionFunction { |
119 public: | 153 public: |
120 DECLARE_EXTENSION_FUNCTION("webViewInternal.setName", | 154 DECLARE_EXTENSION_FUNCTION("webViewInternal.setName", |
121 WEBVIEWINTERNAL_SETNAME); | 155 WEBVIEWINTERNAL_SETNAME); |
122 | 156 |
123 WebViewInternalSetNameFunction(); | 157 WebViewInternalSetNameFunction(); |
124 | 158 |
125 protected: | 159 protected: |
126 ~WebViewInternalSetNameFunction() override; | 160 ~WebViewInternalSetNameFunction() override; |
127 | 161 |
(...skipping 249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
377 uint32 remove_mask_; | 411 uint32 remove_mask_; |
378 // Tracks any data related or parse errors. | 412 // Tracks any data related or parse errors. |
379 bool bad_message_; | 413 bool bad_message_; |
380 | 414 |
381 DISALLOW_COPY_AND_ASSIGN(WebViewInternalClearDataFunction); | 415 DISALLOW_COPY_AND_ASSIGN(WebViewInternalClearDataFunction); |
382 }; | 416 }; |
383 | 417 |
384 } // namespace extensions | 418 } // namespace extensions |
385 | 419 |
386 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ | 420 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ |
OLD | NEW |