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