Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: content/browser/web_contents/web_contents_impl.cc

Issue 10154004: re-use WebUIs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: WeakPtr solution Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/webui/web_ui_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « content/browser/web_contents/web_contents_impl.h ('k') | content/browser/webui/web_ui_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698