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/browser/web_contents/web_contents_impl.h" | 5 #include "content/browser/web_contents/web_contents_impl.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
10 #include "base/metrics/histogram.h" | 10 #include "base/metrics/histogram.h" |
(...skipping 2254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2265 | 2265 |
2266 // Update the URL display. | 2266 // Update the URL display. |
2267 NotifyNavigationStateChanged(content::INVALIDATE_TYPE_URL); | 2267 NotifyNavigationStateChanged(content::INVALIDATE_TYPE_URL); |
2268 } | 2268 } |
2269 | 2269 |
2270 void WebContentsImpl::DidChangeLoadProgress(double progress) { | 2270 void WebContentsImpl::DidChangeLoadProgress(double progress) { |
2271 if (delegate_) | 2271 if (delegate_) |
2272 delegate_->LoadProgressChanged(progress); | 2272 delegate_->LoadProgressChanged(progress); |
2273 } | 2273 } |
2274 | 2274 |
2275 void WebContentsImpl::DocumentAvailableInFrame( | 2275 void WebContentsImpl::DocumentAvailableInMainFrame( |
2276 RenderViewHost* render_view_host, | 2276 RenderViewHost* render_view_host) { |
2277 bool main_frame, | 2277 FOR_EACH_OBSERVER(WebContentsObserver, observers_, |
2278 const GURL& source_url) { | 2278 DocumentAvailableInMainFrame()); |
2279 if (main_frame) { | |
2280 FOR_EACH_OBSERVER(WebContentsObserver, observers_, | |
2281 DocumentAvailableInMainFrame()); | |
2282 } | |
2283 | |
2284 if (render_manager_.web_ui()) | |
2285 render_manager_.web_ui()->DocumentAvailableInFrame(source_url); | |
2286 } | 2279 } |
2287 | 2280 |
2288 void WebContentsImpl::DocumentOnLoadCompletedInMainFrame( | 2281 void WebContentsImpl::DocumentOnLoadCompletedInMainFrame( |
2289 RenderViewHost* render_view_host, | 2282 RenderViewHost* render_view_host, |
2290 int32 page_id) { | 2283 int32 page_id) { |
2291 content::NotificationService::current()->Notify( | 2284 content::NotificationService::current()->Notify( |
2292 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, | 2285 content::NOTIFICATION_LOAD_COMPLETED_MAIN_FRAME, |
2293 content::Source<WebContents>(this), | 2286 content::Source<WebContents>(this), |
2294 content::Details<int>(&page_id)); | 2287 content::Details<int>(&page_id)); |
2295 } | 2288 } |
(...skipping 336 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2632 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { | 2625 void WebContentsImpl::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) { |
2633 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); | 2626 RenderWidgetHostView* rwh_view = GetView()->CreateViewForWidget(rvh); |
2634 // Can be NULL during tests. | 2627 // Can be NULL during tests. |
2635 if (rwh_view) | 2628 if (rwh_view) |
2636 rwh_view->SetSize(GetView()->GetContainerSize()); | 2629 rwh_view->SetSize(GetView()->GetContainerSize()); |
2637 } | 2630 } |
2638 | 2631 |
2639 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { | 2632 RenderViewHostImpl* WebContentsImpl::GetRenderViewHostImpl() { |
2640 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); | 2633 return static_cast<RenderViewHostImpl*>(GetRenderViewHost()); |
2641 } | 2634 } |
OLD | NEW |