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 #include "extensions/renderer/user_script_set.h" | 5 #include "extensions/renderer/user_script_set.h" |
6 | 6 |
7 #include "base/memory/ref_counted.h" | 7 #include "base/memory/ref_counted.h" |
8 #include "content/public/common/url_constants.h" | 8 #include "content/public/common/url_constants.h" |
9 #include "content/public/renderer/render_thread.h" | 9 #include "content/public/renderer/render_thread.h" |
10 #include "extensions/common/extension.h" | 10 #include "extensions/common/extension.h" |
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
210 | 210 |
211 bool inject_css = !script->css_scripts().empty() && | 211 bool inject_css = !script->css_scripts().empty() && |
212 run_location == UserScript::DOCUMENT_START; | 212 run_location == UserScript::DOCUMENT_START; |
213 bool inject_js = | 213 bool inject_js = |
214 !script->js_scripts().empty() && script->run_location() == run_location; | 214 !script->js_scripts().empty() && script->run_location() == run_location; |
215 if (inject_css || inject_js) { | 215 if (inject_css || inject_js) { |
216 injection.reset(new ScriptInjection( | 216 injection.reset(new ScriptInjection( |
217 injector.Pass(), | 217 injector.Pass(), |
218 web_frame->toWebLocalFrame(), | 218 web_frame->toWebLocalFrame(), |
219 host_id, | 219 host_id, |
| 220 script->consumer_instance_type(), |
220 run_location, | 221 run_location, |
221 tab_id)); | 222 tab_id)); |
222 } | 223 } |
223 return injection.Pass(); | 224 return injection.Pass(); |
224 } | 225 } |
225 | 226 |
226 } // namespace extensions | 227 } // namespace extensions |
OLD | NEW |