Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(454)

Side by Side Diff: extensions/renderer/user_script_set.cc

Issue 906493004: Refactoring: de-couple Extensions from "script injection System" [render side]:2 (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@decouple_brower_isolated_world_1
Patch Set: Rebase and remove ConsumerInstanceInfo(id). Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
OLDNEW
« extensions/renderer/user_script_injector.cc ('K') | « extensions/renderer/user_script_injector.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698