diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-14 03:13:06 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-14 03:13:06 +0000 |
commit | e56bbc990c6855f286ebf74e88e1bca0227fe210 (patch) | |
tree | 5ed565ac79a99800fa5cc66b65d52dd40a61a032 /chrome/browser/views/frame | |
parent | 6b33e4da472b3c474a3f1328fdba4a84d4a91886 (diff) | |
download | chromium_src-e56bbc990c6855f286ebf74e88e1bca0227fe210.zip chromium_src-e56bbc990c6855f286ebf74e88e1bca0227fe210.tar.gz chromium_src-e56bbc990c6855f286ebf74e88e1bca0227fe210.tar.bz2 |
rollback again
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11696 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views/frame')
-rw-r--r-- | chrome/browser/views/frame/browser_frame.cc | 24 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_frame.h | 6 | ||||
-rw-r--r-- | chrome/browser/views/frame/browser_view.cc | 2 | ||||
-rw-r--r-- | chrome/browser/views/frame/glass_browser_frame_view.cc | 10 | ||||
-rw-r--r-- | chrome/browser/views/frame/opaque_browser_frame_view.cc | 26 | ||||
-rw-r--r-- | chrome/browser/views/frame/opaque_browser_frame_view.h | 2 |
6 files changed, 35 insertions, 35 deletions
diff --git a/chrome/browser/views/frame/browser_frame.cc b/chrome/browser/views/frame/browser_frame.cc index 10003af..31bf41d 100644 --- a/chrome/browser/views/frame/browser_frame.cc +++ b/chrome/browser/views/frame/browser_frame.cc @@ -24,11 +24,11 @@ static const int kClientEdgeThickness = 3; // BrowserFrame, public: BrowserFrame::BrowserFrame(BrowserView* browser_view) - : WindowWin(browser_view), + : Window(browser_view), browser_view_(browser_view), frame_initialized_(false) { 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); } @@ -37,7 +37,7 @@ BrowserFrame::~BrowserFrame() { } void BrowserFrame::Init() { - WindowWin::Init(NULL, gfx::Rect()); + Window::Init(NULL, gfx::Rect()); } int BrowserFrame::GetMinimizeButtonOffset() const { @@ -104,7 +104,7 @@ LRESULT BrowserFrame::OnNCActivate(BOOL active) { // Perform first time initialization of the DWM frame insets, only if we're // using the native frame. - if (GetNonClientView()->UseNativeFrame() && !frame_initialized_) { + if (non_client_view_->UseNativeFrame() && !frame_initialized_) { if (browser_view_->IsBrowserTypeNormal()) { ::SetWindowPos(GetNativeView(), NULL, 0, 0, 0, 0, SWP_NOSIZE | SWP_NOMOVE | SWP_FRAMECHANGED); @@ -113,15 +113,15 @@ LRESULT BrowserFrame::OnNCActivate(BOOL active) { frame_initialized_ = true; } browser_view_->ActivationChanged(!!active); - return WindowWin::OnNCActivate(active); + return Window::OnNCActivate(active); } LRESULT BrowserFrame::OnNCCalcSize(BOOL mode, LPARAM l_param) { // We don't adjust the client area unless we're a tabbed browser window and // are using the native frame. - if (!GetNonClientView()->UseNativeFrame() || + if (!non_client_view_->UseNativeFrame() || !browser_view_->IsBrowserTypeNormal()) { - return WindowWin::OnNCCalcSize(mode, l_param); + return Window::OnNCCalcSize(mode, l_param); } RECT* client_rect = mode ? @@ -173,14 +173,14 @@ LRESULT BrowserFrame::OnNCCalcSize(BOOL mode, LPARAM l_param) { LRESULT BrowserFrame::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)) { return result; } } - return WindowWin::OnNCHitTest(pt); + return Window::OnNCHitTest(pt); } /////////////////////////////////////////////////////////////////////////////// @@ -191,7 +191,7 @@ int BrowserFrame::GetShowState() const { } views::NonClientFrameView* BrowserFrame::CreateFrameViewForWindow() { - if (GetNonClientView()->UseNativeFrame()) + if (non_client_view_->UseNativeFrame()) browser_frame_view_ = new GlassBrowserFrameView(this, browser_view_); else browser_frame_view_ = new OpaqueBrowserFrameView(this, browser_view_); @@ -199,7 +199,7 @@ views::NonClientFrameView* BrowserFrame::CreateFrameViewForWindow() { } void BrowserFrame::UpdateFrameAfterFrameChange() { - WindowWin::UpdateFrameAfterFrameChange(); + Window::UpdateFrameAfterFrameChange(); UpdateDWMFrame(); } @@ -213,7 +213,7 @@ views::RootView* BrowserFrame::CreateRootView() { void BrowserFrame::UpdateDWMFrame() { // Nothing to do yet. - if (!GetClientView() || !browser_view_->IsBrowserTypeNormal()) + if (!client_view() || !browser_view_->IsBrowserTypeNormal()) return; // In fullscreen mode, we don't extend glass into the client area at all, diff --git a/chrome/browser/views/frame/browser_frame.h b/chrome/browser/views/frame/browser_frame.h index 94d099b..7414719 100644 --- a/chrome/browser/views/frame/browser_frame.h +++ b/chrome/browser/views/frame/browser_frame.h @@ -5,7 +5,7 @@ #ifndef CHROME_BROWSER_VIEWS_FRAME_BROWSER_FRAME_ #define CHROME_BROWSER_VIEWS_FRAME_BROWSER_FRAME_ -#include "chrome/views/window_win.h" +#include "chrome/views/window.h" class AeroGlassNonClientView; class BrowserView; @@ -29,10 +29,10 @@ class BrowserNonClientFrameView : public views::NonClientFrameView { /////////////////////////////////////////////////////////////////////////////// // BrowserFrame // -// BrowserFrame is a WindowWin subclass that provides the window frame for the +// BrowserFrame is a Window subclass that provides the window frame for the // Chrome browser window. // -class BrowserFrame : public views::WindowWin { +class BrowserFrame : public views::Window { public: explicit BrowserFrame(BrowserView* browser_view); virtual ~BrowserFrame(); diff --git a/chrome/browser/views/frame/browser_view.cc b/chrome/browser/views/frame/browser_view.cc index 062c2e1..f8d81d9 100644 --- a/chrome/browser/views/frame/browser_view.cc +++ b/chrome/browser/views/frame/browser_view.cc @@ -1088,7 +1088,7 @@ bool BrowserView::GetSavedWindowBounds(gfx::Rect* bounds) const { } gfx::Rect window_rect = - frame_->GetNonClientView()->GetWindowBoundsForClientBounds(*bounds); + frame_->GetWindowBoundsForClientBounds(*bounds); window_rect.set_origin(bounds->origin()); // When we are given x/y coordinates of 0 on a created popup window, diff --git a/chrome/browser/views/frame/glass_browser_frame_view.cc b/chrome/browser/views/frame/glass_browser_frame_view.cc index c822aa1..40bebe6 100644 --- a/chrome/browser/views/frame/glass_browser_frame_view.cc +++ b/chrome/browser/views/frame/glass_browser_frame_view.cc @@ -115,7 +115,7 @@ GlassBrowserFrameView::GlassBrowserFrameView(BrowserFrame* frame, throbber_running_(false), throbber_frame_(0) { InitClass(); - if (frame_->GetDelegate()->ShouldShowWindowIcon()) + if (frame_->window_delegate()->ShouldShowWindowIcon()) InitThrobberIcons(); } @@ -202,7 +202,7 @@ int GlassBrowserFrameView::NonClientHitTest(const gfx::Point& point) { if (!browser_view_->IsBrowserTypeNormal() || !bounds().Contains(point)) return HTNOWHERE; - int frame_component = frame_->GetClientView()->NonClientHitTest(point); + int frame_component = frame_->client_view()->NonClientHitTest(point); if (frame_component != HTNOWHERE) return frame_component; @@ -210,7 +210,7 @@ int GlassBrowserFrameView::NonClientHitTest(const gfx::Point& point) { int window_component = GetHTComponentForFrame(point, border_thickness, NonClientBorderThickness(), border_thickness, kResizeAreaCornerSize - border_thickness, - frame_->GetDelegate()->CanResize()); + frame_->window_delegate()->CanResize()); // Fall back to the caption if no other component matches. return (window_component == HTNOWHERE) ? HTCAPTION : window_component; } @@ -272,7 +272,7 @@ void GlassBrowserFrameView::PaintDistributorLogo(ChromeCanvas* canvas) { void GlassBrowserFrameView::PaintToolbarBackground(ChromeCanvas* canvas) { gfx::Rect toolbar_bounds(browser_view_->GetToolbarBounds()); gfx::Point toolbar_origin(toolbar_bounds.origin()); - View::ConvertPointToView(frame_->GetClientView(), this, &toolbar_origin); + View::ConvertPointToView(frame_->client_view(), this, &toolbar_origin); toolbar_bounds.set_origin(toolbar_origin); SkBitmap* toolbar_left = @@ -306,7 +306,7 @@ void GlassBrowserFrameView::PaintRestoredClientEdge(ChromeCanvas* canvas) { // The client edges start below the toolbar upper corner images regardless // of how tall the toolbar itself is. int client_area_top = - frame_->GetClientView()->y() + browser_view_->GetToolbarBounds().y() + + frame_->client_view()->y() + browser_view_->GetToolbarBounds().y() + resources_->GetPartBitmap(FRAME_CLIENT_EDGE_TOP_LEFT)->height(); gfx::Rect client_area_bounds = CalculateClientAreaBounds(width(), height()); diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.cc b/chrome/browser/views/frame/opaque_browser_frame_view.cc index 01b8632..8452a37 100644 --- a/chrome/browser/views/frame/opaque_browser_frame_view.cc +++ b/chrome/browser/views/frame/opaque_browser_frame_view.cc @@ -474,7 +474,7 @@ int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) { if (!bounds().Contains(point)) return HTNOWHERE; - int frame_component = frame_->GetClientView()->NonClientHitTest(point); + int frame_component = frame_->client_view()->NonClientHitTest(point); if (frame_component != HTNOWHERE) return frame_component; @@ -496,7 +496,7 @@ int OpaqueBrowserFrameView::NonClientHitTest(const gfx::Point& point) { int window_component = GetHTComponentForFrame(point, TopResizeHeight(), NonClientBorderThickness(), kResizeAreaCornerSize, kResizeAreaCornerSize, - frame_->GetDelegate()->CanResize()); + frame_->window_delegate()->CanResize()); // Fall back to the caption if no other component matches. return (window_component == HTNOWHERE) ? HTCAPTION : window_component; } @@ -621,13 +621,13 @@ void OpaqueBrowserFrameView::SetAccessibleName(const std::wstring& name) { void OpaqueBrowserFrameView::ButtonPressed(views::BaseButton* sender) { if (sender == minimize_button_) - frame_->Minimize(); + frame_->ExecuteSystemMenuCommand(SC_MINIMIZE); else if (sender == maximize_button_) - frame_->Maximize(); + frame_->ExecuteSystemMenuCommand(SC_MAXIMIZE); else if (sender == restore_button_) - frame_->Restore(); + frame_->ExecuteSystemMenuCommand(SC_RESTORE); else if (sender == close_button_) - frame_->Close(); + frame_->ExecuteSystemMenuCommand(SC_CLOSE); } /////////////////////////////////////////////////////////////////////////////// @@ -642,7 +642,7 @@ bool OpaqueBrowserFrameView::ShouldTabIconViewAnimate() const { } SkBitmap OpaqueBrowserFrameView::GetFavIconForTabIconView() { - return frame_->GetDelegate()->GetWindowIcon(); + return frame_->window_delegate()->GetWindowIcon(); } /////////////////////////////////////////////////////////////////////////////// @@ -663,7 +663,7 @@ int OpaqueBrowserFrameView::NonClientBorderThickness() const { } int OpaqueBrowserFrameView::NonClientTopBorderHeight() const { - if (frame_->GetDelegate()->ShouldShowWindowTitle()) { + if (frame_->window_delegate()->ShouldShowWindowTitle()) { int title_top_spacing, title_thickness; return TitleCoordinates(&title_top_spacing, &title_thickness); } @@ -772,7 +772,7 @@ void OpaqueBrowserFrameView::PaintMaximizedFrameBorder(ChromeCanvas* canvas) { resources()->GetPartBitmap(FRAME_NO_TOOLBAR_TOP_CENTER); int edge_height = top_center->height() - kClientEdgeThickness; canvas->TileImageInt(*top_center, 0, - frame_->GetClientView()->y() - edge_height, width(), edge_height); + frame_->client_view()->y() - edge_height, width(), edge_height); } } @@ -787,7 +787,7 @@ void OpaqueBrowserFrameView::PaintDistributorLogo(ChromeCanvas* canvas) { void OpaqueBrowserFrameView::PaintTitleBar(ChromeCanvas* canvas) { // The window icon is painted by the TabIconView. - views::WindowDelegate* d = frame_->GetDelegate(); + views::WindowDelegate* d = frame_->window_delegate(); if (d->ShouldShowWindowTitle()) { canvas->DrawStringInt(d->GetWindowTitle(), title_font_, SK_ColorWHITE, MirroredLeftPointForRect(title_bounds_), title_bounds_.y(), @@ -807,7 +807,7 @@ void OpaqueBrowserFrameView::PaintToolbarBackground(ChromeCanvas* canvas) { gfx::Rect toolbar_bounds(browser_view_->GetToolbarBounds()); gfx::Point toolbar_origin(toolbar_bounds.origin()); - View::ConvertPointToView(frame_->GetClientView(), this, &toolbar_origin); + View::ConvertPointToView(frame_->client_view(), this, &toolbar_origin); toolbar_bounds.set_origin(toolbar_origin); SkBitmap* toolbar_left = @@ -848,7 +848,7 @@ void OpaqueBrowserFrameView::PaintOTRAvatar(ChromeCanvas* canvas) { } void OpaqueBrowserFrameView::PaintRestoredClientEdge(ChromeCanvas* canvas) { - int client_area_top = frame_->GetClientView()->y(); + int client_area_top = frame_->client_view()->y(); gfx::Rect client_area_bounds = CalculateClientAreaBounds(width(), height()); if (browser_view_->IsToolbarVisible()) { @@ -991,7 +991,7 @@ void OpaqueBrowserFrameView::LayoutTitleBar() { if (!frame_->IsMaximized()) icon_y -= kIconRestoredAdjust; - views::WindowDelegate* d = frame_->GetDelegate(); + views::WindowDelegate* d = frame_->window_delegate(); if (!d->ShouldShowWindowIcon()) icon_size = 0; if (window_icon_) diff --git a/chrome/browser/views/frame/opaque_browser_frame_view.h b/chrome/browser/views/frame/opaque_browser_frame_view.h index ee805f8..d62bf71 100644 --- a/chrome/browser/views/frame/opaque_browser_frame_view.h +++ b/chrome/browser/views/frame/opaque_browser_frame_view.h @@ -112,7 +112,7 @@ class OpaqueBrowserFrameView : public BrowserNonClientFrameView, // Returns the set of resources to use to paint this view. views::WindowResources* resources() const { - return frame_->IsActive() || paint_as_active() ? + return frame_->is_active() || paint_as_active() ? current_active_resources_ : current_inactive_resources_; } |