Chromium Code Reviews| 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 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 122 | 122 |
| 123 bool ShouldInsertCSS() const override; | 123 bool ShouldInsertCSS() const override; |
| 124 | 124 |
| 125 DECLARE_EXTENSION_FUNCTION("webViewInternal.insertCSS", | 125 DECLARE_EXTENSION_FUNCTION("webViewInternal.insertCSS", |
| 126 WEBVIEWINTERNAL_INSERTCSS) | 126 WEBVIEWINTERNAL_INSERTCSS) |
| 127 | 127 |
| 128 private: | 128 private: |
| 129 DISALLOW_COPY_AND_ASSIGN(WebViewInternalInsertCSSFunction); | 129 DISALLOW_COPY_AND_ASSIGN(WebViewInternalInsertCSSFunction); |
| 130 }; | 130 }; |
| 131 | 131 |
| 132 class WebViewInternalAddContentScriptsFunction : public AsyncExtensionFunction { | |
|
Devlin
2015/04/08 17:50:56
AsyncExtensionFunction is dead. Long live UIThrea
Xi Han
2015/04/08 22:10:36
Updated here, since this API doesn't send an Async
Devlin
2015/04/10 16:04:31
FYI, UIThreadExtensionFunction is used for both Sy
Xi Han
2015/04/10 18:27:06
Acknowledged.
| |
| 133 public: | |
| 134 DECLARE_EXTENSION_FUNCTION("webViewInternal.addContentScripts", | |
| 135 WEBVIEWINTERNAL_ADDCONTENTSCRIPTS); | |
| 136 | |
| 137 WebViewInternalAddContentScriptsFunction(); | |
| 138 | |
| 139 protected: | |
| 140 ~WebViewInternalAddContentScriptsFunction() override; | |
| 141 | |
| 142 private: | |
| 143 bool RunAsync() override; | |
| 144 | |
| 145 DISALLOW_COPY_AND_ASSIGN(WebViewInternalAddContentScriptsFunction); | |
| 146 }; | |
| 147 | |
| 148 class WebViewInternalRemoveContentScriptsFunction | |
| 149 : public AsyncExtensionFunction { | |
| 150 public: | |
| 151 DECLARE_EXTENSION_FUNCTION("webViewInternal.removeContentScripts", | |
| 152 WEBVIEWINTERNAL_REMOVECONTENTSCRIPTS); | |
| 153 | |
| 154 WebViewInternalRemoveContentScriptsFunction(); | |
| 155 | |
| 156 protected: | |
| 157 ~WebViewInternalRemoveContentScriptsFunction() override; | |
| 158 | |
| 159 private: | |
| 160 bool RunAsync() override; | |
| 161 | |
| 162 DISALLOW_COPY_AND_ASSIGN(WebViewInternalRemoveContentScriptsFunction); | |
| 163 }; | |
| 164 | |
| 132 class WebViewInternalSetNameFunction : public WebViewInternalExtensionFunction { | 165 class WebViewInternalSetNameFunction : public WebViewInternalExtensionFunction { |
| 133 public: | 166 public: |
| 134 DECLARE_EXTENSION_FUNCTION("webViewInternal.setName", | 167 DECLARE_EXTENSION_FUNCTION("webViewInternal.setName", |
| 135 WEBVIEWINTERNAL_SETNAME); | 168 WEBVIEWINTERNAL_SETNAME); |
| 136 | 169 |
| 137 WebViewInternalSetNameFunction(); | 170 WebViewInternalSetNameFunction(); |
| 138 | 171 |
| 139 protected: | 172 protected: |
| 140 ~WebViewInternalSetNameFunction() override; | 173 ~WebViewInternalSetNameFunction() override; |
| 141 | 174 |
| (...skipping 283 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 425 uint32 remove_mask_; | 458 uint32 remove_mask_; |
| 426 // Tracks any data related or parse errors. | 459 // Tracks any data related or parse errors. |
| 427 bool bad_message_; | 460 bool bad_message_; |
| 428 | 461 |
| 429 DISALLOW_COPY_AND_ASSIGN(WebViewInternalClearDataFunction); | 462 DISALLOW_COPY_AND_ASSIGN(WebViewInternalClearDataFunction); |
| 430 }; | 463 }; |
| 431 | 464 |
| 432 } // namespace extensions | 465 } // namespace extensions |
| 433 | 466 |
| 434 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ | 467 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ |
| OLD | NEW |