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 EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_ |
6 #define EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_ | 6 #define EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_ |
7 | 7 |
8 #include "extensions/browser/extension_function.h" | 8 #include "extensions/browser/extension_function.h" |
9 #include "extensions/browser/script_executor.h" | 9 #include "extensions/browser/script_executor.h" |
10 #include "extensions/common/api/extension_types.h" | 10 #include "extensions/common/api/extension_types.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 void DidLoadAndLocalizeFile(const std::string& file, | 43 void DidLoadAndLocalizeFile(const std::string& file, |
44 bool success, | 44 bool success, |
45 const std::string& data); | 45 const std::string& data); |
46 | 46 |
47 const HostID& host_id() const { return host_id_; } | 47 const HostID& host_id() const { return host_id_; } |
48 void set_host_id(HostID host_id) { | 48 void set_host_id(HostID host_id) { |
49 host_id_ = host_id; | 49 host_id_ = host_id; |
50 } | 50 } |
51 | 51 |
52 // The injection details. | 52 // The injection details. |
53 scoped_ptr<core_api::extension_types::InjectDetails> details_; | 53 scoped_ptr<api::extension_types::InjectDetails> details_; |
54 | 54 |
55 private: | 55 private: |
56 // Called when contents from the file whose path is specified in JSON | 56 // Called when contents from the file whose path is specified in JSON |
57 // arguments has been loaded. | 57 // arguments has been loaded. |
58 void DidLoadFile(bool success, const std::string& data); | 58 void DidLoadFile(bool success, const std::string& data); |
59 | 59 |
60 // Runs on FILE thread. Loads message bundles for the extension and | 60 // Runs on FILE thread. Loads message bundles for the extension and |
61 // localizes the CSS data. Calls back DidLoadAndLocalizeFile on the UI thread. | 61 // localizes the CSS data. Calls back DidLoadAndLocalizeFile on the UI thread. |
62 void GetFileURLAndLocalizeCSS(ScriptExecutor::ScriptType script_type, | 62 void GetFileURLAndLocalizeCSS(ScriptExecutor::ScriptType script_type, |
63 const std::string& data, | 63 const std::string& data, |
(...skipping 12 matching lines...) Expand all Loading... |
76 // The URL of the file being injected into the page. | 76 // The URL of the file being injected into the page. |
77 GURL file_url_; | 77 GURL file_url_; |
78 | 78 |
79 // The ID of the injection host. | 79 // The ID of the injection host. |
80 HostID host_id_; | 80 HostID host_id_; |
81 }; | 81 }; |
82 | 82 |
83 } // namespace extensions | 83 } // namespace extensions |
84 | 84 |
85 #endif // EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_ | 85 #endif // EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_H_ |
OLD | NEW |