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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
59 ~WebViewInternalExecuteCodeFunction() override; | 59 ~WebViewInternalExecuteCodeFunction() override; |
60 | 60 |
61 // Initialize |details_| if it hasn't already been. | 61 // Initialize |details_| if it hasn't already been. |
62 bool Init() override; | 62 bool Init() override; |
63 bool ShouldInsertCSS() const override; | 63 bool ShouldInsertCSS() const override; |
64 bool CanExecuteScriptOnPage() override; | 64 bool CanExecuteScriptOnPage() override; |
65 // Guarded by a process ID check. | 65 // Guarded by a process ID check. |
66 extensions::ScriptExecutor* GetScriptExecutor() final; | 66 extensions::ScriptExecutor* GetScriptExecutor() final; |
67 bool IsWebView() const override; | 67 bool IsWebView() const override; |
68 const GURL& GetWebViewSrc() const override; | 68 const GURL& GetWebViewSrc() const override; |
69 int GetScriptInjectionInstanceId() const override; | |
69 | 70 |
70 private: | 71 private: |
71 // Contains extension resource built from path of file which is | 72 // Contains extension resource built from path of file which is |
72 // specified in JSON arguments. | 73 // specified in JSON arguments. |
73 extensions::ExtensionResource resource_; | 74 extensions::ExtensionResource resource_; |
74 | 75 |
75 int guest_instance_id_; | 76 int guest_instance_id_; |
76 | 77 |
77 GURL guest_src_; | 78 GURL guest_src_; |
78 | 79 |
80 int script_injection_instance_id_; | |
Devlin
2015/02/06 00:28:41
You need to initialize this in the constructor.
Xi Han
2015/02/06 17:21:45
Done.
| |
81 | |
79 DISALLOW_COPY_AND_ASSIGN(WebViewInternalExecuteCodeFunction); | 82 DISALLOW_COPY_AND_ASSIGN(WebViewInternalExecuteCodeFunction); |
80 }; | 83 }; |
81 | 84 |
82 class WebViewInternalExecuteScriptFunction | 85 class WebViewInternalExecuteScriptFunction |
83 : public WebViewInternalExecuteCodeFunction { | 86 : public WebViewInternalExecuteCodeFunction { |
84 public: | 87 public: |
85 WebViewInternalExecuteScriptFunction(); | 88 WebViewInternalExecuteScriptFunction(); |
86 | 89 |
87 protected: | 90 protected: |
88 ~WebViewInternalExecuteScriptFunction() override {} | 91 ~WebViewInternalExecuteScriptFunction() override {} |
(...skipping 271 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
360 uint32 remove_mask_; | 363 uint32 remove_mask_; |
361 // Tracks any data related or parse errors. | 364 // Tracks any data related or parse errors. |
362 bool bad_message_; | 365 bool bad_message_; |
363 | 366 |
364 DISALLOW_COPY_AND_ASSIGN(WebViewInternalClearDataFunction); | 367 DISALLOW_COPY_AND_ASSIGN(WebViewInternalClearDataFunction); |
365 }; | 368 }; |
366 | 369 |
367 } // namespace extensions | 370 } // namespace extensions |
368 | 371 |
369 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ | 372 #endif // CHROME_BROWSER_EXTENSIONS_API_WEB_VIEW_WEB_VIEW_INTERNAL_API_H_ |
OLD | NEW |