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/script_injection.h" | 5 #include "extensions/renderer/script_injection.h" |
6 | 6 |
7 #include <map> | 7 #include <map> |
8 #include <utility> | 8 #include <utility> |
9 | 9 |
10 #include "base/lazy_instance.h" | 10 #include "base/lazy_instance.h" |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/metrics/histogram.h" | 12 #include "base/metrics/histogram_macros.h" |
13 #include "base/timer/elapsed_timer.h" | 13 #include "base/timer/elapsed_timer.h" |
14 #include "base/values.h" | 14 #include "base/values.h" |
15 #include "content/public/child/v8_value_converter.h" | 15 #include "content/public/child/v8_value_converter.h" |
16 #include "content/public/renderer/render_frame.h" | 16 #include "content/public/renderer/render_frame.h" |
17 #include "extensions/common/extension_messages.h" | 17 #include "extensions/common/extension_messages.h" |
18 #include "extensions/common/host_id.h" | 18 #include "extensions/common/host_id.h" |
19 #include "extensions/renderer/dom_activity_logger.h" | 19 #include "extensions/renderer/dom_activity_logger.h" |
20 #include "extensions/renderer/extension_frame_helper.h" | 20 #include "extensions/renderer/extension_frame_helper.h" |
21 #include "extensions/renderer/extension_groups.h" | 21 #include "extensions/renderer/extension_groups.h" |
22 #include "extensions/renderer/extensions_renderer_client.h" | 22 #include "extensions/renderer/extensions_renderer_client.h" |
(...skipping 300 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 void ScriptInjection::InjectCss(std::set<std::string>* injected_stylesheets, | 323 void ScriptInjection::InjectCss(std::set<std::string>* injected_stylesheets, |
324 size_t* num_injected_stylesheets) { | 324 size_t* num_injected_stylesheets) { |
325 std::vector<blink::WebString> css_sources = injector_->GetCssSources( | 325 std::vector<blink::WebString> css_sources = injector_->GetCssSources( |
326 run_location_, injected_stylesheets, num_injected_stylesheets); | 326 run_location_, injected_stylesheets, num_injected_stylesheets); |
327 blink::WebLocalFrame* web_frame = render_frame_->GetWebFrame(); | 327 blink::WebLocalFrame* web_frame = render_frame_->GetWebFrame(); |
328 for (const blink::WebString& css : css_sources) | 328 for (const blink::WebString& css : css_sources) |
329 web_frame->document().insertStyleSheet(css); | 329 web_frame->document().insertStyleSheet(css); |
330 } | 330 } |
331 | 331 |
332 } // namespace extensions | 332 } // namespace extensions |
OLD | NEW |