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/extension_function.h" | 8 #include "chrome/browser/extensions/extension_function.h" |
9 #include "chrome/common/extensions/api/tabs.h" | 9 #include "chrome/common/extensions/api/tabs.h" |
10 | 10 |
(...skipping 18 matching lines...) Expand all Loading... |
29 // Initialize |details_| if it hasn't already been. | 29 // Initialize |details_| if it hasn't already been. |
30 virtual bool Init() = 0; | 30 virtual bool Init() = 0; |
31 virtual bool ShouldInsertCSS() const = 0; | 31 virtual bool ShouldInsertCSS() const = 0; |
32 virtual bool CanExecuteScriptOnPage() = 0; | 32 virtual bool CanExecuteScriptOnPage() = 0; |
33 virtual ScriptExecutor* GetScriptExecutor() = 0; | 33 virtual ScriptExecutor* GetScriptExecutor() = 0; |
34 virtual bool IsWebView() const = 0; | 34 virtual bool IsWebView() const = 0; |
35 | 35 |
36 virtual void OnExecuteCodeFinished(const std::string& error, | 36 virtual void OnExecuteCodeFinished(const std::string& error, |
37 int32 on_page_id, | 37 int32 on_page_id, |
38 const GURL& on_url, | 38 const GURL& on_url, |
39 const ListValue& result); | 39 const base::ListValue& result); |
40 | 40 |
41 // The injection details. | 41 // The injection details. |
42 scoped_ptr<api::tabs::InjectDetails> details_; | 42 scoped_ptr<api::tabs::InjectDetails> details_; |
43 | 43 |
44 private: | 44 private: |
45 // Called when contents from the file whose path is specified in JSON | 45 // Called when contents from the file whose path is specified in JSON |
46 // arguments has been loaded. | 46 // arguments has been loaded. |
47 void DidLoadFile(bool success, const std::string& data); | 47 void DidLoadFile(bool success, const std::string& data); |
48 | 48 |
49 // Runs on FILE thread. Loads message bundles for the extension and | 49 // Runs on FILE thread. Loads message bundles for the extension and |
(...skipping 13 matching lines...) Expand all Loading... |
63 | 63 |
64 // Contains extension resource built from path of file which is | 64 // Contains extension resource built from path of file which is |
65 // specified in JSON arguments. | 65 // specified in JSON arguments. |
66 ExtensionResource resource_; | 66 ExtensionResource resource_; |
67 }; | 67 }; |
68 | 68 |
69 } // namespace extensions | 69 } // namespace extensions |
70 | 70 |
71 #endif // CHROME_BROWSER_EXTENSIONS_API_EXECUTE_CODE_FUNCTION_H_ | 71 #endif // CHROME_BROWSER_EXTENSIONS_API_EXECUTE_CODE_FUNCTION_H_ |
72 | 72 |
OLD | NEW |