OLD | NEW |
1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 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 CHROME_BROWSER_EXTENSIONS_API_EXECUTE_CODE_FUNCTION_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_EXECUTE_CODE_FUNCTION_H_ |
6 #define CHROME_BROWSER_EXTENSIONS_API_EXECUTE_CODE_FUNCTION_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_EXECUTE_CODE_FUNCTION_H_ |
7 | 7 |
8 #include "chrome/browser/extensions/chrome_extension_function.h" | 8 #include "chrome/browser/extensions/chrome_extension_function.h" |
9 #include "chrome/browser/extensions/script_executor.h" | 9 #include "chrome/browser/extensions/script_executor.h" |
10 #include "chrome/common/extensions/api/tabs.h" | 10 #include "chrome/common/extensions/api/tabs.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 // ExtensionFunction implementation. | 24 // ExtensionFunction implementation. |
25 virtual bool HasPermission() OVERRIDE; | 25 virtual bool HasPermission() OVERRIDE; |
26 virtual bool RunImpl() OVERRIDE; | 26 virtual bool RunImpl() OVERRIDE; |
27 | 27 |
28 // Initialize |details_| if it hasn't already been. | 28 // Initialize |details_| if it hasn't already been. |
29 virtual bool Init() = 0; | 29 virtual bool Init() = 0; |
30 virtual bool ShouldInsertCSS() const = 0; | 30 virtual bool ShouldInsertCSS() const = 0; |
31 virtual bool CanExecuteScriptOnPage() = 0; | 31 virtual bool CanExecuteScriptOnPage() = 0; |
32 virtual ScriptExecutor* GetScriptExecutor() = 0; | 32 virtual ScriptExecutor* GetScriptExecutor() = 0; |
33 virtual bool IsWebView() const = 0; | 33 virtual bool IsWebView() const = 0; |
| 34 virtual std::string GetWebViewSrc() const = 0; |
34 | 35 |
35 virtual void OnExecuteCodeFinished(const std::string& error, | 36 virtual void OnExecuteCodeFinished(const std::string& error, |
36 int32 on_page_id, | 37 int32 on_page_id, |
37 const GURL& on_url, | 38 const GURL& on_url, |
38 const base::ListValue& result); | 39 const base::ListValue& result); |
39 | 40 |
40 // The injection details. | 41 // The injection details. |
41 scoped_ptr<api::tabs::InjectDetails> details_; | 42 scoped_ptr<api::tabs::InjectDetails> details_; |
42 | 43 |
43 private: | 44 private: |
(...skipping 22 matching lines...) Expand all Loading... |
66 ExtensionResource resource_; | 67 ExtensionResource resource_; |
67 | 68 |
68 // The URL of the file being injected into the page. | 69 // The URL of the file being injected into the page. |
69 GURL file_url_; | 70 GURL file_url_; |
70 }; | 71 }; |
71 | 72 |
72 } // namespace extensions | 73 } // namespace extensions |
73 | 74 |
74 #endif // CHROME_BROWSER_EXTENSIONS_API_EXECUTE_CODE_FUNCTION_H_ | 75 #endif // CHROME_BROWSER_EXTENSIONS_API_EXECUTE_CODE_FUNCTION_H_ |
75 | 76 |
OLD | NEW |