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_EXECUTE_CODE_FUNCTION_IMPL_H_ | 5 #ifndef EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_ |
6 #define EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_ | 6 #define EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_ |
7 | 7 |
8 #include "extensions/browser/api/execute_code_function.h" | 8 #include "extensions/browser/api/execute_code_function.h" |
9 | 9 |
10 #include "extensions/browser/component_extension_resource_manager.h" | 10 #include "extensions/browser/component_extension_resource_manager.h" |
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 extension()->id(), | 165 extension()->id(), |
166 script_type, | 166 script_type, |
167 code_string, | 167 code_string, |
168 frame_scope, | 168 frame_scope, |
169 match_about_blank, | 169 match_about_blank, |
170 run_at, | 170 run_at, |
171 ScriptExecutor::ISOLATED_WORLD, | 171 ScriptExecutor::ISOLATED_WORLD, |
172 IsWebView() ? ScriptExecutor::WEB_VIEW_PROCESS | 172 IsWebView() ? ScriptExecutor::WEB_VIEW_PROCESS |
173 : ScriptExecutor::DEFAULT_PROCESS, | 173 : ScriptExecutor::DEFAULT_PROCESS, |
174 GetWebViewSrc(), | 174 GetWebViewSrc(), |
| 175 GetScriptInjectionInstanceId(), |
175 file_url_, | 176 file_url_, |
176 user_gesture_, | 177 user_gesture_, |
177 has_callback() ? ScriptExecutor::JSON_SERIALIZED_RESULT | 178 has_callback() ? ScriptExecutor::JSON_SERIALIZED_RESULT |
178 : ScriptExecutor::NO_RESULT, | 179 : ScriptExecutor::NO_RESULT, |
179 base::Bind(&ExecuteCodeFunction::OnExecuteCodeFinished, this)); | 180 base::Bind(&ExecuteCodeFunction::OnExecuteCodeFinished, this)); |
180 return true; | 181 return true; |
181 } | 182 } |
182 | 183 |
183 bool ExecuteCodeFunction::HasPermission() { | 184 bool ExecuteCodeFunction::HasPermission() { |
184 return true; | 185 return true; |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 const base::ListValue& result) { | 238 const base::ListValue& result) { |
238 if (!error.empty()) | 239 if (!error.empty()) |
239 SetError(error); | 240 SetError(error); |
240 | 241 |
241 SendResponse(error.empty()); | 242 SendResponse(error.empty()); |
242 } | 243 } |
243 | 244 |
244 } // namespace extensions | 245 } // namespace extensions |
245 | 246 |
246 #endif // EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_ | 247 #endif // EXTENSIONS_BROWSER_API_EXECUTE_CODE_FUNCTION_IMPL_H_ |
OLD | NEW |