OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 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 #include "extensions/renderer/extension_frame_helper.h" | 5 #include "extensions/renderer/extension_frame_helper.h" |
6 | 6 |
7 #include "base/metrics/histogram_macros.h" | 7 #include "base/metrics/histogram_macros.h" |
8 #include "base/strings/string_util.h" | 8 #include "base/strings/string_util.h" |
9 #include "base/timer/elapsed_timer.h" | 9 #include "base/timer/elapsed_timer.h" |
10 #include "content/public/renderer/render_frame.h" | 10 #include "content/public/renderer/render_frame.h" |
(...skipping 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
180 } | 180 } |
181 | 181 |
182 void ExtensionFrameHelper::DidMatchCSS( | 182 void ExtensionFrameHelper::DidMatchCSS( |
183 const blink::WebVector<blink::WebString>& newly_matching_selectors, | 183 const blink::WebVector<blink::WebString>& newly_matching_selectors, |
184 const blink::WebVector<blink::WebString>& stopped_matching_selectors) { | 184 const blink::WebVector<blink::WebString>& stopped_matching_selectors) { |
185 extension_dispatcher_->content_watcher()->DidMatchCSS( | 185 extension_dispatcher_->content_watcher()->DidMatchCSS( |
186 render_frame()->GetWebFrame(), newly_matching_selectors, | 186 render_frame()->GetWebFrame(), newly_matching_selectors, |
187 stopped_matching_selectors); | 187 stopped_matching_selectors); |
188 } | 188 } |
189 | 189 |
190 void ExtensionFrameHelper::DidStartProvisionalLoad() { | 190 void ExtensionFrameHelper::DidStartProvisionalLoad( |
| 191 blink::WebDataSource* data_source) { |
191 if (!delayed_main_world_script_initialization_) | 192 if (!delayed_main_world_script_initialization_) |
192 return; | 193 return; |
193 | 194 |
194 delayed_main_world_script_initialization_ = false; | 195 delayed_main_world_script_initialization_ = false; |
195 v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); | 196 v8::HandleScope handle_scope(v8::Isolate::GetCurrent()); |
196 v8::Local<v8::Context> context = | 197 v8::Local<v8::Context> context = |
197 render_frame()->GetWebFrame()->mainWorldScriptContext(); | 198 render_frame()->GetWebFrame()->mainWorldScriptContext(); |
198 v8::Context::Scope context_scope(context); | 199 v8::Context::Scope context_scope(context); |
199 extension_dispatcher_->DidCreateScriptContext(render_frame()->GetWebFrame(), | 200 extension_dispatcher_->DidCreateScriptContext(render_frame()->GetWebFrame(), |
200 context, 0); | 201 context, 0); |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
316 const base::ListValue& args) { | 317 const base::ListValue& args) { |
317 extension_dispatcher_->InvokeModuleSystemMethod( | 318 extension_dispatcher_->InvokeModuleSystemMethod( |
318 render_frame(), extension_id, module_name, function_name, args); | 319 render_frame(), extension_id, module_name, function_name, args); |
319 } | 320 } |
320 | 321 |
321 void ExtensionFrameHelper::OnDestruct() { | 322 void ExtensionFrameHelper::OnDestruct() { |
322 delete this; | 323 delete this; |
323 } | 324 } |
324 | 325 |
325 } // namespace extensions | 326 } // namespace extensions |
OLD | NEW |