summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views/toolbar_view.cc
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-08 17:47:43 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-06-08 17:47:43 +0000
commit68c477df6917633a7a9c64f8624446ca0bd895d5 (patch)
treea270354aa75de9516ba5b150568bb1d142b24b1c /chrome/browser/ui/views/toolbar_view.cc
parent8a9c6c3401524c0a4b5d37d65335e9124885305a (diff)
downloadchromium_src-68c477df6917633a7a9c64f8624446ca0bd895d5.zip
chromium_src-68c477df6917633a7a9c64f8624446ca0bd895d5.tar.gz
chromium_src-68c477df6917633a7a9c64f8624446ca0bd895d5.tar.bz2
Move more from Window onto Widget.
BUG=72040 TEST=none Review URL: http://codereview.chromium.org/7054052 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@88356 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views/toolbar_view.cc')
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc12
1 files changed, 6 insertions, 6 deletions
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index 281993e..9721b0b 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -462,7 +462,7 @@ gfx::Size ToolbarView::GetPreferredSize() {
}
int vertical_spacing = PopupTopSpacing() +
- (GetWindow()->ShouldUseNativeFrame() ?
+ (GetWidget()->ShouldUseNativeFrame() ?
kPopupBottomSpacingGlass : kPopupBottomSpacingNonGlass);
return gfx::Size(0, location_bar_->GetPreferredSize().height() +
vertical_spacing);
@@ -562,7 +562,7 @@ void ToolbarView::OnPaint(gfx::Canvas* canvas) {
// it from the content area. For non-glass, the NonClientView draws the
// toolbar background below the location bar for us.
// NOTE: Keep this in sync with BrowserView::GetInfoBarSeparatorColor()!
- if (GetWindow()->ShouldUseNativeFrame())
+ if (GetWidget()->ShouldUseNativeFrame())
canvas->FillRectInt(SK_ColorBLACK, 0, height() - 1, width(), 1);
}
@@ -633,16 +633,16 @@ bool ToolbarView::ShouldShowIncompatibilityWarning() {
}
int ToolbarView::PopupTopSpacing() const {
- // TODO(beng): For some reason GetWindow() returns NULL here in some
+ // TODO(beng): For some reason GetWidget() returns NULL here in some
// unidentified circumstances on ChromeOS. This means GetWidget()
// succeeded but we were (probably) unable to locate a
// NativeWidgetGtk* on it using
// NativeWidget::GetNativeWidgetForNativeView.
// I am throwing in a NULL check for now to stop the hurt, but
// it's possible the crash may just show up somewhere else.
- const views::Window* window = GetWindow();
- DCHECK(window) << "If you hit this please talk to beng";
- return window && window->ShouldUseNativeFrame() ?
+ const views::Widget* widget = GetWidget();
+ DCHECK(widget) << "If you hit this please talk to beng";
+ return widget && widget->ShouldUseNativeFrame() ?
0 : kPopupTopSpacingNonGlass;
}