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

Unified Diff: chrome/browser/ui/sad_tab_observer.cc

Issue 9030010: Move most of the remaining users of WebContentsObserver::tab_contents() to use web_contents(). (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper.cc ('k') | chrome/browser/ui/snapshot_tab_helper.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/sad_tab_observer.cc
===================================================================
--- chrome/browser/ui/sad_tab_observer.cc (revision 115777)
+++ chrome/browser/ui/sad_tab_observer.cc (working copy)
@@ -39,7 +39,7 @@
return;
gfx::NativeView view = AcquireSadTab(status);
- tab_contents()->GetView()->InstallOverlayView(view);
+ web_contents()->GetView()->InstallOverlayView(view);
}
void SadTabObserver::Observe(int type,
@@ -48,7 +48,7 @@
switch (type) {
case content::NOTIFICATION_TAB_CONTENTS_CONNECTED:
if (HasSadTab()) {
- tab_contents()->GetView()->RemoveOverlayView();
+ web_contents()->GetView()->RemoveOverlayView();
ReleaseSadTab();
}
break;
@@ -73,12 +73,12 @@
// and later re-parent it.
// TODO(avi): This is a cheat. Can this be made cleaner?
sad_tab_params.parent_widget =
- static_cast<TabContentsViewViews*>(tab_contents()->GetView());
+ static_cast<TabContentsViewViews*>(web_contents()->GetView());
sad_tab_params.ownership =
views::Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET;
sad_tab_.reset(new views::Widget);
sad_tab_->Init(sad_tab_params);
- sad_tab_->SetContentsView(new SadTabView(tab_contents(), kind));
+ sad_tab_->SetContentsView(new SadTabView(web_contents(), kind));
return sad_tab_->GetNativeView();
#elif defined(TOOLKIT_GTK)
sad_tab_.reset(new SadTabGtk(
« no previous file with comments | « chrome/browser/ui/prefs/prefs_tab_helper.cc ('k') | chrome/browser/ui/snapshot_tab_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698