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 3193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3204 navigation_state->set_request_committed(true); | 3204 navigation_state->set_request_committed(true); |
3205 | 3205 |
3206 UpdateURL(frame); | 3206 UpdateURL(frame); |
3207 | 3207 |
3208 // If this committed load was initiated by a client redirect, we're | 3208 // If this committed load was initiated by a client redirect, we're |
3209 // at the last stop now, so clear it. | 3209 // at the last stop now, so clear it. |
3210 completed_client_redirect_src_ = Referrer(); | 3210 completed_client_redirect_src_ = Referrer(); |
3211 | 3211 |
3212 // Check whether we have new encoding name. | 3212 // Check whether we have new encoding name. |
3213 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); | 3213 UpdateEncoding(frame, frame->view()->pageEncoding().utf8()); |
| 3214 |
| 3215 if (!frame->parent()) { // Only for top frames. |
| 3216 RenderThreadImpl* render_thread_impl = RenderThreadImpl::current(); |
| 3217 if (render_thread_impl) { // Can be NULL in tests. |
| 3218 render_thread_impl->histogram_customizer()-> |
| 3219 RenderViewNavigatedToHost(GURL(GetLoadingUrl(frame)).host(), |
| 3220 g_view_map.Get().size()); |
| 3221 } |
| 3222 } |
3214 } | 3223 } |
3215 | 3224 |
3216 void RenderViewImpl::didClearWindowObject(WebFrame* frame) { | 3225 void RenderViewImpl::didClearWindowObject(WebFrame* frame) { |
3217 FOR_EACH_OBSERVER(RenderViewObserver, observers_, | 3226 FOR_EACH_OBSERVER(RenderViewObserver, observers_, |
3218 DidClearWindowObject(frame)); | 3227 DidClearWindowObject(frame)); |
3219 | 3228 |
3220 GURL frame_url = frame->document().url(); | 3229 GURL frame_url = frame->document().url(); |
3221 if ((enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) && | 3230 if ((enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) && |
3222 (frame_url.SchemeIs(chrome::kChromeUIScheme) || | 3231 (frame_url.SchemeIs(chrome::kChromeUIScheme) || |
3223 frame_url.SchemeIs(chrome::kDataScheme))) { | 3232 frame_url.SchemeIs(chrome::kDataScheme))) { |
(...skipping 2668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5892 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5901 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5893 return !!RenderThreadImpl::current()->compositor_thread(); | 5902 return !!RenderThreadImpl::current()->compositor_thread(); |
5894 } | 5903 } |
5895 | 5904 |
5896 void RenderViewImpl::OnJavaBridgeInit() { | 5905 void RenderViewImpl::OnJavaBridgeInit() { |
5897 DCHECK(!java_bridge_dispatcher_); | 5906 DCHECK(!java_bridge_dispatcher_); |
5898 #if defined(ENABLE_JAVA_BRIDGE) | 5907 #if defined(ENABLE_JAVA_BRIDGE) |
5899 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); | 5908 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); |
5900 #endif | 5909 #endif |
5901 } | 5910 } |
OLD | NEW |