summaryrefslogtreecommitdiffstats
path: root/chrome/browser/ui/views
diff options
context:
space:
mode:
authorben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-07 22:03:10 +0000
committerben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-07 22:03:10 +0000
commit94098fe02a8c5950df6453ccca7621a2d2a6816f (patch)
tree202c8855a76a7e11bb88fb46fe409a3c4d0888cd /chrome/browser/ui/views
parent172f155f817cc56e1ca36bee6aeeca7f8f95bb64 (diff)
downloadchromium_src-94098fe02a8c5950df6453ccca7621a2d2a6816f.zip
chromium_src-94098fe02a8c5950df6453ccca7621a2d2a6816f.tar.gz
chromium_src-94098fe02a8c5950df6453ccca7621a2d2a6816f.tar.bz2
Move WindowDelegate and NonClientView creation and management to Window.
This makes WindowGtk/WindowWin a little uglier for now, will improve with consolidation of more functions into Window. BUG=72040 TEST=none Review URL: http://codereview.chromium.org/6621033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77194 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/views')
-rw-r--r--chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc3
-rw-r--r--chrome/browser/ui/views/constrained_window_win.cc20
-rw-r--r--chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc10
-rw-r--r--chrome/browser/ui/views/frame/browser_frame_gtk.cc2
-rw-r--r--chrome/browser/ui/views/frame/browser_frame_win.cc12
-rw-r--r--chrome/browser/ui/views/frame/browser_view.cc4
-rw-r--r--chrome/browser/ui/views/frame/glass_browser_frame_view.cc8
-rw-r--r--chrome/browser/ui/views/frame/opaque_browser_frame_view.cc28
-rw-r--r--chrome/browser/ui/views/select_file_dialog.cc2
-rw-r--r--chrome/browser/ui/views/tabs/tab.cc2
-rw-r--r--chrome/browser/ui/views/tabs/tab_strip.cc2
-rw-r--r--chrome/browser/ui/views/toolbar_view.cc6
12 files changed, 50 insertions, 49 deletions
diff --git a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
index cd6fea2..75aea90 100644
--- a/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
+++ b/chrome/browser/ui/views/bookmarks/bookmark_bubble_view.cc
@@ -90,8 +90,9 @@ void BookmarkBubbleView::Show(views::Window* parent,
return;
bubble_ = new BookmarkBubbleView(delegate, profile, url, newly_bookmarked);
+ // TODO(beng): Pass |parent| after V2 is complete.
InfoBubble* info_bubble = InfoBubble::Show(
- parent->GetClientView()->GetWidget(), bounds, BubbleBorder::TOP_RIGHT,
+ parent->client_view()->GetWidget(), bounds, BubbleBorder::TOP_RIGHT,
bubble_, bubble_);
// |bubble_| can be set to NULL in InfoBubbleClosing when we close the bubble
// asynchronously. However, that can happen during the Show call above if the
diff --git a/chrome/browser/ui/views/constrained_window_win.cc b/chrome/browser/ui/views/constrained_window_win.cc
index 2f3f932..641d542 100644
--- a/chrome/browser/ui/views/constrained_window_win.cc
+++ b/chrome/browser/ui/views/constrained_window_win.cc
@@ -308,7 +308,7 @@ int ConstrainedWindowFrameView::NonClientHitTest(const gfx::Point& point) {
if (!bounds().Contains(point))
return HTNOWHERE;
- int frame_component = container_->GetClientView()->NonClientHitTest(point);
+ int frame_component = container_->client_view()->NonClientHitTest(point);
// See if we're in the sysmenu region. (We check the ClientView first to be
// consistent with OpaqueBrowserFrameView; it's not really necessary here.)
@@ -326,7 +326,7 @@ int ConstrainedWindowFrameView::NonClientHitTest(const gfx::Point& point) {
int window_component = GetHTComponentForFrame(point, kFrameBorderThickness,
NonClientBorderThickness(), kResizeAreaCornerSize, kResizeAreaCornerSize,
- container_->GetDelegate()->CanResize());
+ container_->window_delegate()->CanResize());
// Fall back to the caption if no other component matches.
return (window_component == HTNOWHERE) ? HTCAPTION : window_component;
}
@@ -566,15 +566,15 @@ views::NonClientFrameView* ConstrainedWindowWin::CreateFrameViewForWindow() {
void ConstrainedWindowWin::FocusConstrainedWindow() {
if ((!owner_->delegate() ||
owner_->delegate()->ShouldFocusConstrainedWindow()) &&
- GetDelegate() && GetDelegate()->GetInitiallyFocusedView()) {
- GetDelegate()->GetInitiallyFocusedView()->RequestFocus();
+ window_delegate() && window_delegate()->GetInitiallyFocusedView()) {
+ window_delegate()->GetInitiallyFocusedView()->RequestFocus();
}
}
void ConstrainedWindowWin::ShowConstrainedWindow() {
// We marked the view as hidden during construction. Mark it as
// visible now so FocusManager will let us receive focus.
- GetNonClientView()->SetVisible(true);
+ non_client_view()->SetVisible(true);
if (owner_->delegate())
owner_->delegate()->WillShowConstrainedWindow(owner_);
ActivateConstrainedWindow();
@@ -593,8 +593,8 @@ void ConstrainedWindowWin::CloseConstrainedWindow() {
}
std::wstring ConstrainedWindowWin::GetWindowTitle() const {
- if (GetDelegate())
- return GetDelegate()->GetWindowTitle();
+ if (window_delegate())
+ return window_delegate()->GetWindowTitle();
// TODO(pkasting): Shouldn't this be using a localized string, or else calling
// NOTREACHED()?
@@ -613,7 +613,7 @@ ConstrainedWindowWin::ConstrainedWindowWin(
views::WindowDelegate* window_delegate)
: WindowWin(window_delegate),
owner_(owner) {
- GetNonClientView()->SetFrameView(CreateFrameViewForWindow());
+ non_client_view()->SetFrameView(CreateFrameViewForWindow());
set_window_style(WS_CHILD | WS_CLIPSIBLINGS | WS_CLIPCHILDREN | WS_CAPTION |
WS_THICKFRAME | WS_SYSMENU);
@@ -621,7 +621,7 @@ ConstrainedWindowWin::ConstrainedWindowWin(
// Views default to visible. Since we are creating a window that is
// not visible (no WS_VISIBLE), mark our View as hidden so that
// FocusManager can deal with it properly.
- GetNonClientView()->SetVisible(false);
+ non_client_view()->SetVisible(false);
WindowWin::Init(owner_->GetNativeView(), gfx::Rect());
}
@@ -667,7 +667,7 @@ void ConstrainedWindowWin::OnWindowPosChanged(WINDOWPOS* window_pos) {
// If the window was moved or sized, tell the owner.
if (!(window_pos->flags & SWP_NOMOVE) || !(window_pos->flags & SWP_NOSIZE))
owner_->DidMoveOrResize(this);
- SetMsgHandled(FALSE);
+ WindowWin::OnWindowPosChanged(window_pos);
}
diff --git a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
index 1cd4116..40fa89d 100644
--- a/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc
@@ -147,7 +147,7 @@ int AppPanelBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
return HTNOWHERE;
int frame_component =
- frame_->GetWindow()->GetClientView()->NonClientHitTest(point);
+ frame_->GetWindow()->client_view()->NonClientHitTest(point);
// See if we're in the sysmenu region. (We check the ClientView first to be
// consistent with OpaqueBrowserFrameView; it's not really necessary here.)
@@ -171,7 +171,7 @@ int AppPanelBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
int window_component = GetHTComponentForFrame(point,
NonClientBorderThickness(), NonClientBorderThickness(),
kResizeAreaCornerSize, kResizeAreaCornerSize,
- frame_->GetWindow()->GetDelegate()->CanResize());
+ frame_->GetWindow()->window_delegate()->CanResize());
// Fall back to the caption if no other component matches.
return (window_component == HTNOWHERE) ? HTCAPTION : window_component;
}
@@ -251,7 +251,7 @@ bool AppPanelBrowserFrameView::ShouldTabIconViewAnimate() const {
}
SkBitmap AppPanelBrowserFrameView::GetFavIconForTabIconView() {
- return frame_->GetWindow()->GetDelegate()->GetWindowIcon();
+ return frame_->GetWindow()->window_delegate()->GetWindowIcon();
}
///////////////////////////////////////////////////////////////////////////////
@@ -396,13 +396,13 @@ void AppPanelBrowserFrameView::PaintMaximizedFrameBorder(gfx::Canvas* canvas) {
SkBitmap* titlebar_bottom = rb.GetBitmapNamed(IDR_APP_TOP_CENTER);
int edge_height = titlebar_bottom->height() - kClientEdgeThickness;
canvas->TileImageInt(*titlebar_bottom, 0,
- frame_->GetWindow()->GetClientView()->y() - edge_height,
+ frame_->GetWindow()->client_view()->y() - edge_height,
width(), edge_height);
}
void AppPanelBrowserFrameView::PaintTitleBar(gfx::Canvas* canvas) {
// The window icon is painted by the TabIconView.
- views::WindowDelegate* d = frame_->GetWindow()->GetDelegate();
+ views::WindowDelegate* d = frame_->GetWindow()->window_delegate();
canvas->DrawStringInt(d->GetWindowTitle(), BrowserFrame::GetTitleFont(),
SK_ColorBLACK, GetMirroredXForRect(title_bounds_), title_bounds_.y(),
title_bounds_.width(), title_bounds_.height());
diff --git a/chrome/browser/ui/views/frame/browser_frame_gtk.cc b/chrome/browser/ui/views/frame/browser_frame_gtk.cc
index ef8b1d4..6c8da688 100644
--- a/chrome/browser/ui/views/frame/browser_frame_gtk.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_gtk.cc
@@ -49,7 +49,7 @@ void BrowserFrameGtk::InitBrowserFrame() {
browser_frame_view_ =
browser::CreateBrowserNonClientFrameView(this, browser_view_);
- GetNonClientView()->SetFrameView(browser_frame_view_);
+ non_client_view()->SetFrameView(browser_frame_view_);
WindowGtk::InitWindow(NULL, gfx::Rect());
// Don't focus anything on creation, selecting a tab will set the focus.
}
diff --git a/chrome/browser/ui/views/frame/browser_frame_win.cc b/chrome/browser/ui/views/frame/browser_frame_win.cc
index 9638f10..54b6e41 100644
--- a/chrome/browser/ui/views/frame/browser_frame_win.cc
+++ b/chrome/browser/ui/views/frame/browser_frame_win.cc
@@ -56,7 +56,7 @@ BrowserFrameWin::BrowserFrameWin(BrowserView* browser_view, Profile* profile)
frame_initialized_(false),
profile_(profile) {
browser_view_->set_frame(this);
- GetNonClientView()->SetFrameView(CreateFrameViewForWindow());
+ non_client_view()->SetFrameView(CreateFrameViewForWindow());
// Don't focus anything on creation, selecting a tab will set the focus.
set_focus_on_creation(false);
}
@@ -139,7 +139,7 @@ void BrowserFrameWin::TabStripDisplayModeChanged() {
gfx::Insets BrowserFrameWin::GetClientAreaInsets() const {
// Use the default client insets for an opaque frame or a glass popup/app
// frame.
- if (!GetNonClientView()->UseNativeFrame() ||
+ if (!non_client_view()->UseNativeFrame() ||
!browser_view_->IsBrowserTypeNormal()) {
return WindowWin::GetClientAreaInsets();
}
@@ -200,7 +200,7 @@ LRESULT BrowserFrameWin::OnNCActivate(BOOL active) {
LRESULT BrowserFrameWin::OnNCHitTest(const CPoint& pt) {
// Only do DWM hit-testing when we are using the native frame.
- if (GetNonClientView()->UseNativeFrame()) {
+ if (non_client_view()->UseNativeFrame()) {
LRESULT result;
if (DwmDefWindowProc(GetNativeView(), WM_NCHITTEST, 0,
MAKELPARAM(pt.x, pt.y), &result)) {
@@ -224,8 +224,8 @@ void BrowserFrameWin::OnWindowPosChanged(WINDOWPOS* window_pos) {
// SWP_SHOWWINDOW, however callers typically are careful about not specifying
// this flag unless necessary to avoid flicker.
if (window_pos->flags & SWP_SHOWWINDOW) {
- GetNonClientView()->Layout();
- GetNonClientView()->SchedulePaint();
+ non_client_view()->Layout();
+ non_client_view()->SchedulePaint();
}
}
@@ -283,7 +283,7 @@ views::RootView* BrowserFrameWin::CreateRootView() {
void BrowserFrameWin::UpdateDWMFrame() {
// Nothing to do yet, or we're not showing a DWM frame.
- if (!GetClientView() || !AlwaysUseNativeFrame())
+ if (!client_view() || !AlwaysUseNativeFrame())
return;
MARGINS margins = { 0 };
diff --git a/chrome/browser/ui/views/frame/browser_view.cc b/chrome/browser/ui/views/frame/browser_view.cc
index 894a4a5..96605d8 100644
--- a/chrome/browser/ui/views/frame/browser_view.cc
+++ b/chrome/browser/ui/views/frame/browser_view.cc
@@ -1660,7 +1660,7 @@ bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const {
bounds->height() + toolbar_->GetPreferredSize().height());
}
- gfx::Rect window_rect = frame_->GetWindow()->GetNonClientView()->
+ gfx::Rect window_rect = frame_->GetWindow()->non_client_view()->
GetWindowBoundsForClientBounds(*bounds);
window_rect.set_origin(bounds->origin());
@@ -2573,7 +2573,7 @@ BrowserWindow* BrowserWindow::CreateBrowserWindow(Browser* browser) {
BrowserView* view = new BrowserView(browser);
BrowserFrame::Create(view, browser->profile());
- view->GetWindow()->GetNonClientView()->SetAccessibleName(
+ view->GetWindow()->non_client_view()->SetAccessibleName(
l10n_util::GetStringUTF16(IDS_PRODUCT_NAME));
return view;
diff --git a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
index c52ba7c..98dc9e7 100644
--- a/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/glass_browser_frame_view.cc
@@ -66,7 +66,7 @@ GlassBrowserFrameView::GlassBrowserFrameView(BrowserFrame* frame,
browser_view_(browser_view),
throbber_running_(false),
throbber_frame_(0) {
- if (frame_->GetWindow()->GetDelegate()->ShouldShowWindowIcon())
+ if (frame_->GetWindow()->window_delegate()->ShouldShowWindowIcon())
InitThrobberIcons();
}
@@ -167,7 +167,7 @@ int GlassBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
return HTNOWHERE;
int frame_component =
- frame_->GetWindow()->GetClientView()->NonClientHitTest(point);
+ frame_->GetWindow()->client_view()->NonClientHitTest(point);
// See if we're in the sysmenu region. We still have to check the tabstrip
// first so that clicks in a tab don't get treated as sysmenu clicks.
@@ -184,7 +184,7 @@ int GlassBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
int window_component = GetHTComponentForFrame(point, frame_border_thickness,
nonclient_border_thickness, frame_border_thickness,
kResizeAreaCornerSize - frame_border_thickness,
- frame_->GetWindow()->GetDelegate()->CanResize());
+ frame_->GetWindow()->window_delegate()->CanResize());
// Fall back to the caption if no other component matches.
return (window_component == HTNOWHERE) ? HTCAPTION : window_component;
}
@@ -368,7 +368,7 @@ void GlassBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
// of how tall the toolbar itself is.
int client_area_top = browser_view_->UseVerticalTabs() ?
client_area_bounds.y() :
- (frame_->GetWindow()->GetClientView()->y() +
+ (frame_->GetWindow()->client_view()->y() +
browser_view_->GetToolbarBounds().y() +
tp->GetBitmapNamed(IDR_CONTENT_TOP_LEFT_CORNER)->height());
int client_area_bottom =
diff --git a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
index 3bdbd2c..8501d29 100644
--- a/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
+++ b/chrome/browser/ui/views/frame/opaque_browser_frame_view.cc
@@ -238,7 +238,7 @@ gfx::Size OpaqueBrowserFrameView::GetMinimumSize() {
min_size.Enlarge(2 * border_thickness,
NonClientTopBorderHeight(false, false) + border_thickness);
- views::WindowDelegate* delegate = frame_->GetWindow()->GetDelegate();
+ views::WindowDelegate* delegate = frame_->GetWindow()->window_delegate();
int min_titlebar_width = (2 * FrameBorderThickness(false)) +
kIconLeftSpacing +
(delegate && delegate->ShouldShowWindowIcon() ?
@@ -283,7 +283,7 @@ int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
return HTNOWHERE;
int frame_component =
- frame_->GetWindow()->GetClientView()->NonClientHitTest(point);
+ frame_->GetWindow()->client_view()->NonClientHitTest(point);
// See if we're in the sysmenu region. We still have to check the tabstrip
// first so that clicks in a tab don't get treated as sysmenu clicks.
@@ -313,8 +313,8 @@ int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) {
minimize_button_->GetMirroredBounds().Contains(point))
return HTMINBUTTON;
- views::WindowDelegate* delegate = frame_->GetWindow()->GetDelegate();
- if (delegate == NULL) {
+ views::WindowDelegate* delegate = frame_->GetWindow()->window_delegate();
+ if (!delegate) {
LOG(WARNING) << "delegate is NULL, returning safe default.";
return HTCAPTION;
}
@@ -384,7 +384,7 @@ bool OpaqueBrowserFrameView::HitTest(const gfx::Point& l) const {
bool vertical_tabs = browser_view_->UseVerticalTabs();
gfx::Rect tabstrip_bounds = browser_view_->tabstrip()->bounds();
gfx::Point tabstrip_origin(tabstrip_bounds.origin());
- View::ConvertPointToView(frame_->GetWindow()->GetClientView(),
+ View::ConvertPointToView(frame_->GetWindow()->client_view(),
this, &tabstrip_origin);
tabstrip_bounds.set_origin(tabstrip_origin);
if ((!vertical_tabs && l.y() > tabstrip_bounds.bottom()) ||
@@ -432,8 +432,8 @@ bool OpaqueBrowserFrameView::ShouldTabIconViewAnimate() const {
}
SkBitmap OpaqueBrowserFrameView::GetFavIconForTabIconView() {
- views::WindowDelegate* delegate = frame_->GetWindow()->GetDelegate();
- if (delegate == NULL) {
+ views::WindowDelegate* delegate = frame_->GetWindow()->window_delegate();
+ if (!delegate) {
LOG(WARNING) << "delegate is NULL, returning safe default.";
return SkBitmap();
}
@@ -465,7 +465,7 @@ int OpaqueBrowserFrameView::NonClientTopBorderHeight(
bool restored,
bool ignore_vertical_tabs) const {
views::Window* window = frame_->GetWindow();
- views::WindowDelegate* delegate = window->GetDelegate();
+ views::WindowDelegate* delegate = window->window_delegate();
// |delegate| may be NULL if called from callback of InputMethodChanged while
// a window is being destroyed.
// See more discussion at http://crosbug.com/8958
@@ -509,7 +509,7 @@ gfx::Rect OpaqueBrowserFrameView::IconBounds() const {
int size = IconSize();
int frame_thickness = FrameBorderThickness(false);
int y;
- views::WindowDelegate* delegate = frame_->GetWindow()->GetDelegate();
+ views::WindowDelegate* delegate = frame_->GetWindow()->window_delegate();
if (delegate && (delegate->ShouldShowWindowIcon() ||
delegate->ShouldShowWindowTitle())) {
// Our frame border has a different "3D look" than Windows'. Theirs has a
@@ -698,14 +698,14 @@ void OpaqueBrowserFrameView::PaintMaximizedFrameBorder(gfx::Canvas* canvas) {
tp->GetBitmapNamed(IDR_APP_TOP_CENTER);
int edge_height = top_center->height() - kClientEdgeThickness;
canvas->TileImageInt(*top_center, 0,
- window->GetClientView()->y() - edge_height, width(), edge_height);
+ window->client_view()->y() - edge_height, width(), edge_height);
}
}
void OpaqueBrowserFrameView::PaintTitleBar(gfx::Canvas* canvas) {
// The window icon is painted by the TabIconView.
- views::WindowDelegate* delegate = frame_->GetWindow()->GetDelegate();
- if (delegate == NULL) {
+ views::WindowDelegate* delegate = frame_->GetWindow()->window_delegate();
+ if (!delegate) {
LOG(WARNING) << "delegate is NULL";
return;
}
@@ -856,7 +856,7 @@ void OpaqueBrowserFrameView::PaintOTRAvatar(gfx::Canvas* canvas) {
void OpaqueBrowserFrameView::PaintRestoredClientEdge(gfx::Canvas* canvas) {
ui::ThemeProvider* tp = GetThemeProvider();
- int client_area_top = frame_->GetWindow()->GetClientView()->y();
+ int client_area_top = frame_->GetWindow()->client_view()->y();
int image_top = client_area_top;
gfx::Rect client_area_bounds = CalculateClientAreaBounds(width(), height());
@@ -1019,7 +1019,7 @@ void OpaqueBrowserFrameView::LayoutTitleBar() {
// The window title is based on the calculated icon position, even when there
// is no icon.
gfx::Rect icon_bounds(IconBounds());
- views::WindowDelegate* delegate = frame_->GetWindow()->GetDelegate();
+ views::WindowDelegate* delegate = frame_->GetWindow()->window_delegate();
if (delegate && delegate->ShouldShowWindowIcon())
window_icon_->SetBoundsRect(icon_bounds);
diff --git a/chrome/browser/ui/views/select_file_dialog.cc b/chrome/browser/ui/views/select_file_dialog.cc
index 0aa3970..92652d2 100644
--- a/chrome/browser/ui/views/select_file_dialog.cc
+++ b/chrome/browser/ui/views/select_file_dialog.cc
@@ -491,6 +491,6 @@ void SelectFileDialogImpl::FileBrowseDelegateHandler::HandleSetDialogTitle(
DCHECK(containing_view);
containing_view->GetWindow()->UpdateWindowTitle();
- containing_view->GetWindow()->GetNonClientView()->SchedulePaint();
+ containing_view->GetWindow()->non_client_view()->SchedulePaint();
}
}
diff --git a/chrome/browser/ui/views/tabs/tab.cc b/chrome/browser/ui/views/tabs/tab.cc
index e6cf2f0..341e742 100644
--- a/chrome/browser/ui/views/tabs/tab.cc
+++ b/chrome/browser/ui/views/tabs/tab.cc
@@ -445,7 +445,7 @@ void Tab::PaintInactiveTabBackground(gfx::Canvas* canvas) {
int tab_id;
if (GetWidget() &&
- GetWidget()->GetWindow()->GetNonClientView()->UseNativeFrame()) {
+ GetWidget()->GetWindow()->non_client_view()->UseNativeFrame()) {
tab_id = IDR_THEME_TAB_BACKGROUND_V;
} else {
tab_id = is_otr ? IDR_THEME_TAB_BACKGROUND_INCOGNITO :
diff --git a/chrome/browser/ui/views/tabs/tab_strip.cc b/chrome/browser/ui/views/tabs/tab_strip.cc
index 059c7e5..43bb125 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.cc
+++ b/chrome/browser/ui/views/tabs/tab_strip.cc
@@ -282,7 +282,7 @@ void TabStrip::PaintChildren(gfx::Canvas* canvas) {
}
}
- if (GetWindow()->GetNonClientView()->UseNativeFrame()) {
+ if (GetWindow()->non_client_view()->UseNativeFrame()) {
// Make sure unselected tabs are somewhat transparent.
SkPaint paint;
paint.setColor(SkColorSetARGB(200, 255, 255, 255));
diff --git a/chrome/browser/ui/views/toolbar_view.cc b/chrome/browser/ui/views/toolbar_view.cc
index 1eb475a..5e4ba94 100644
--- a/chrome/browser/ui/views/toolbar_view.cc
+++ b/chrome/browser/ui/views/toolbar_view.cc
@@ -483,7 +483,7 @@ gfx::Size ToolbarView::GetPreferredSize() {
}
int vertical_spacing = PopupTopSpacing() +
- (GetWindow()->GetNonClientView()->UseNativeFrame() ?
+ (GetWindow()->non_client_view()->UseNativeFrame() ?
kPopupBottomSpacingGlass : kPopupBottomSpacingNonGlass);
return gfx::Size(0, location_bar_->GetPreferredSize().height() +
vertical_spacing);
@@ -596,7 +596,7 @@ void ToolbarView::OnPaint(gfx::Canvas* canvas) {
// For glass, we need to draw a black line below the location bar to separate
// it from the content area. For non-glass, the NonClientView draws the
// toolbar background below the location bar for us.
- if (GetWindow()->GetNonClientView()->UseNativeFrame())
+ if (GetWindow()->non_client_view()->UseNativeFrame())
canvas->FillRectInt(SK_ColorBLACK, 0, height() - 1, width(), 1);
}
@@ -668,7 +668,7 @@ bool ToolbarView::ShouldShowIncompatibilityWarning() {
}
int ToolbarView::PopupTopSpacing() const {
- return GetWindow()->GetNonClientView()->UseNativeFrame() ?
+ return GetWindow()->non_client_view()->UseNativeFrame() ?
0 : kPopupTopSpacingNonGlass;
}