OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "content/renderer/render_view_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 2923 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2934 dom_automation_controller_->set_routing_id(routing_id()); | 2934 dom_automation_controller_->set_routing_id(routing_id()); |
2935 dom_automation_controller_->BindToJavascript(frame, | 2935 dom_automation_controller_->BindToJavascript(frame, |
2936 "domAutomationController"); | 2936 "domAutomationController"); |
2937 } | 2937 } |
2938 } | 2938 } |
2939 | 2939 |
2940 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { | 2940 void RenderViewImpl::didCreateDocumentElement(WebFrame* frame) { |
2941 // Notify the browser about non-blank documents loading in the top frame. | 2941 // Notify the browser about non-blank documents loading in the top frame. |
2942 GURL url = frame->document().url(); | 2942 GURL url = frame->document().url(); |
2943 if (url.is_valid() && url.spec() != chrome::kAboutBlankURL) { | 2943 if (url.is_valid() && url.spec() != chrome::kAboutBlankURL) { |
2944 Send(new ViewHostMsg_DocumentAvailableInFrame( | 2944 if (frame == webview()->mainFrame()) |
2945 routing_id_, | 2945 Send(new ViewHostMsg_DocumentAvailableInMainFrame(routing_id_)); |
2946 frame == webview()->mainFrame(), | |
2947 frame->document().url())); | |
2948 } | 2946 } |
2949 | 2947 |
2950 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 2948 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
2951 DidCreateDocumentElement(frame)); | 2949 DidCreateDocumentElement(frame)); |
2952 } | 2950 } |
2953 | 2951 |
2954 void RenderViewImpl::didReceiveTitle(WebFrame* frame, const WebString& title, | 2952 void RenderViewImpl::didReceiveTitle(WebFrame* frame, const WebString& title, |
2955 WebTextDirection direction) { | 2953 WebTextDirection direction) { |
2956 UpdateTitle(frame, title, direction); | 2954 UpdateTitle(frame, title, direction); |
2957 | 2955 |
(...skipping 2299 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5257 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5255 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5258 return !!RenderThreadImpl::current()->compositor_thread(); | 5256 return !!RenderThreadImpl::current()->compositor_thread(); |
5259 } | 5257 } |
5260 | 5258 |
5261 void RenderViewImpl::OnJavaBridgeInit() { | 5259 void RenderViewImpl::OnJavaBridgeInit() { |
5262 DCHECK(!java_bridge_dispatcher_.get()); | 5260 DCHECK(!java_bridge_dispatcher_.get()); |
5263 #if defined(ENABLE_JAVA_BRIDGE) | 5261 #if defined(ENABLE_JAVA_BRIDGE) |
5264 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5262 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5265 #endif | 5263 #endif |
5266 } | 5264 } |
OLD | NEW |