diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 21:24:42 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-03-13 21:24:42 +0000 |
commit | a04f125f5fe5bbc56a3feaac4121a29452becedf (patch) | |
tree | 5121b9ab8c64747b940babce8f962ac70e1b1fc9 /chrome/browser/views | |
parent | b19f1cd7bf78c0d8cf23483d4bbf82466d93372e (diff) | |
download | chromium_src-a04f125f5fe5bbc56a3feaac4121a29452becedf.zip chromium_src-a04f125f5fe5bbc56a3feaac4121a29452becedf.tar.gz chromium_src-a04f125f5fe5bbc56a3feaac4121a29452becedf.tar.bz2 |
revert
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@11671 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/views')
25 files changed, 63 insertions, 75 deletions
diff --git a/chrome/browser/views/about_chrome_view.cc b/chrome/browser/views/about_chrome_view.cc index c997c1d..91c10e0 100644 --- a/chrome/browser/views/about_chrome_view.cc +++ b/chrome/browser/views/about_chrome_view.cc @@ -784,7 +784,7 @@ void AboutChromeView::UpdateStatus(GoogleUpdateUpgradeResult result, new_version_available_); update_label_.SetText(update_string); show_success_indicator = true; - RestartMessageBox::ShowMessageBox(window()->GetNativeWindow()); + RestartMessageBox::ShowMessageBox(window()->GetNativeView()); break; } case UPGRADE_ERROR: diff --git a/chrome/browser/views/about_ipc_dialog.cc b/chrome/browser/views/about_ipc_dialog.cc index 6e9848c..673661d 100644 --- a/chrome/browser/views/about_ipc_dialog.cc +++ b/chrome/browser/views/about_ipc_dialog.cc @@ -26,7 +26,6 @@ #include "chrome/common/render_messages.h" #include "chrome/views/grid_layout.h" #include "chrome/views/text_button.h" -#include "chrome/views/widget.h" #include "chrome/views/window.h" #include "net/url_request/url_request.h" #include "net/url_request/url_request_job.h" diff --git a/chrome/browser/views/bookmark_editor_view.cc b/chrome/browser/views/bookmark_editor_view.cc index 8b803bb..6810d63 100644 --- a/chrome/browser/views/bookmark_editor_view.cc +++ b/chrome/browser/views/bookmark_editor_view.cc @@ -16,7 +16,6 @@ #include "chrome/views/focus_manager.h" #include "chrome/views/grid_layout.h" #include "chrome/views/label.h" -#include "chrome/views/widget.h" #include "chrome/views/window.h" #include "googleurl/src/gurl.h" #include "grit/chromium_strings.h" diff --git a/chrome/browser/views/bookmark_manager_view.cc b/chrome/browser/views/bookmark_manager_view.cc index a0de947..fb868c2 100644 --- a/chrome/browser/views/bookmark_manager_view.cc +++ b/chrome/browser/views/bookmark_manager_view.cc @@ -30,7 +30,6 @@ #include "chrome/views/label.h" #include "chrome/views/menu_button.h" #include "chrome/views/single_split_view.h" -#include "chrome/views/widget.h" #include "chrome/views/window.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" diff --git a/chrome/browser/views/constrained_window_impl.cc b/chrome/browser/views/constrained_window_impl.cc index 7b815f3..3d0869a 100644 --- a/chrome/browser/views/constrained_window_impl.cc +++ b/chrome/browser/views/constrained_window_impl.cc @@ -368,7 +368,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); if (frame_component != HTNOWHERE) return frame_component; @@ -378,7 +378,7 @@ int ConstrainedWindowFrameView::NonClientHitTest(const gfx::Point& point) { int window_component = GetHTComponentForFrame(point, FrameBorderThickness(), 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; } @@ -653,8 +653,8 @@ void ConstrainedWindowImpl::DidBecomeSelected() { std::wstring ConstrainedWindowImpl::GetWindowTitle() const { std::wstring display_title; - if (GetDelegate()) - display_title = GetDelegate()->GetWindowTitle(); + if (window_delegate()) + display_title = window_delegate()->GetWindowTitle(); else display_title = L"Untitled"; @@ -671,9 +671,9 @@ const gfx::Rect& ConstrainedWindowImpl::GetCurrentBounds() const { ConstrainedWindowImpl::ConstrainedWindowImpl( TabContents* owner, views::WindowDelegate* window_delegate) - : WindowWin(window_delegate), + : Window(window_delegate), owner_(owner) { - GetNonClientView()->SetFrameView(CreateFrameViewForWindow()); + non_client_view_->SetFrameView(CreateFrameViewForWindow()); Init(); } @@ -685,7 +685,7 @@ void ConstrainedWindowImpl::Init() { } void ConstrainedWindowImpl::InitAsDialog(const gfx::Rect& initial_bounds) { - WindowWin::Init(owner_->GetNativeView(), initial_bounds); + Window::Init(owner_->GetNativeView(), initial_bounds); ActivateConstrainedWindow(); } @@ -719,7 +719,7 @@ void ConstrainedWindowImpl::OnDestroy() { } // Make sure we call super so that it can do its cleanup. - WindowWin::OnDestroy(); + Window::OnDestroy(); } void ConstrainedWindowImpl::OnFinalMessage(HWND window) { @@ -727,7 +727,7 @@ void ConstrainedWindowImpl::OnFinalMessage(HWND window) { // list. owner_->WillClose(this); - WindowWin::OnFinalMessage(window); + WidgetWin::OnFinalMessage(window); } LRESULT ConstrainedWindowImpl::OnMouseActivate(HWND window, diff --git a/chrome/browser/views/constrained_window_impl.h b/chrome/browser/views/constrained_window_impl.h index ca2da6d..30e6303 100644 --- a/chrome/browser/views/constrained_window_impl.h +++ b/chrome/browser/views/constrained_window_impl.h @@ -8,7 +8,7 @@ #include "base/gfx/rect.h" #include "chrome/browser/tab_contents/constrained_window.h" #include "chrome/browser/tab_contents/tab_contents_delegate.h" -#include "chrome/views/window_win.h" +#include "chrome/views/window.h" class ConstrainedTabContentsWindowDelegate; class ConstrainedWindowAnimation; @@ -25,7 +25,7 @@ class WindowDelegate; // a child HWND with a custom window frame. // class ConstrainedWindowImpl : public ConstrainedWindow, - public views::WindowWin { + public views::Window { public: virtual ~ConstrainedWindowImpl(); diff --git a/chrome/browser/views/first_run_customize_view.cc b/chrome/browser/views/first_run_customize_view.cc index e9ad65e..1f8e132 100644 --- a/chrome/browser/views/first_run_customize_view.cc +++ b/chrome/browser/views/first_run_customize_view.cc @@ -201,7 +201,7 @@ bool FirstRunCustomizeView::Accept() { int browser_selected = import_from_combo_->GetSelectedItem(); FirstRun::ImportSettings(profile_, browser_selected, GetDefaultImportItems(), - window()->GetNativeWindow()); + window()->GetNativeView()); } if (default_browser_->IsSelected()) SetDefaultBrowser(); diff --git a/chrome/browser/views/first_run_view.cc b/chrome/browser/views/first_run_view.cc index f2df7be..13a10a1 100644 --- a/chrome/browser/views/first_run_view.cc +++ b/chrome/browser/views/first_run_view.cc @@ -150,7 +150,7 @@ void FirstRunView::Layout() { void FirstRunView::OpenCustomizeDialog() { // The customize dialog now owns the importer host object. views::Window::CreateChromeWindow( - window()->GetNativeWindow(), + window()->GetNativeView(), gfx::Rect(), new FirstRunCustomizeView(profile_, importer_host_, @@ -182,7 +182,7 @@ bool FirstRunView::Accept() { SetDefaultBrowser(); // Index 0 is the default browser. FirstRun::ImportSettings(profile_, 0, GetDefaultImportItems(), - window()->GetNativeWindow()); + window()->GetNativeView()); UserMetrics::RecordAction(L"FirstRunDef_Accept", profile_); return true; 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_; } diff --git a/chrome/browser/views/hung_renderer_view.cc b/chrome/browser/views/hung_renderer_view.cc index ef78677..4dc72f6 100644 --- a/chrome/browser/views/hung_renderer_view.cc +++ b/chrome/browser/views/hung_renderer_view.cc @@ -225,7 +225,7 @@ void HungRendererWarningView::ShowForWebContents(WebContents* contents) { HWND frame_hwnd = GetAncestor(contents->GetNativeView(), GA_ROOT); HWND foreground_window = GetForegroundWindow(); if (foreground_window != frame_hwnd && - foreground_window != window()->GetNativeWindow()) { + foreground_window != window()->GetNativeView()) { return; } @@ -403,7 +403,8 @@ gfx::Rect HungRendererWarningView::GetDisplayBounds( CRect contents_bounds; GetWindowRect(contents_hwnd, &contents_bounds); - gfx::Rect window_bounds = window()->GetBounds(); + gfx::Rect window_bounds; + window()->GetBounds(&window_bounds, true); int window_x = contents_bounds.left + (contents_bounds.Width() - window_bounds.width()) / 2; diff --git a/chrome/browser/views/input_window.cc b/chrome/browser/views/input_window.cc index a2bc55b..6add8e8 100644 --- a/chrome/browser/views/input_window.cc +++ b/chrome/browser/views/input_window.cc @@ -4,8 +4,6 @@ #include "chrome/browser/views/input_window.h" -#include "base/message_loop.h" -#include "base/task.h" #include "chrome/browser/views/standard_layout.h" #include "chrome/common/l10n_util.h" #include "chrome/views/grid_layout.h" @@ -167,6 +165,6 @@ views::Window* CreateInputWindow(HWND parent_hwnd, views::Window* window = views::Window::CreateChromeWindow(parent_hwnd, gfx::Rect(), new ContentView(delegate)); - window->GetClientView()->AsDialogClientView()->UpdateDialogButtons(); + window->client_view()->AsDialogClientView()->UpdateDialogButtons(); return window; } diff --git a/chrome/browser/views/keyword_editor_view.cc b/chrome/browser/views/keyword_editor_view.cc index a19a3ce..86c93eb7 100644 --- a/chrome/browser/views/keyword_editor_view.cc +++ b/chrome/browser/views/keyword_editor_view.cc @@ -25,7 +25,6 @@ #include "chrome/views/dialog_delegate.h" #include "chrome/views/grid_layout.h" #include "chrome/views/text_field.h" -#include "chrome/views/widget.h" #include "chrome/views/window.h" #include "googleurl/src/gurl.h" #include "grit/generated_resources.h" diff --git a/chrome/browser/views/options/advanced_contents_view.cc b/chrome/browser/views/options/advanced_contents_view.cc index d3e46b2..cc44291 100644 --- a/chrome/browser/views/options/advanced_contents_view.cc +++ b/chrome/browser/views/options/advanced_contents_view.cc @@ -38,7 +38,6 @@ #include "chrome/views/combo_box.h" #include "chrome/views/grid_layout.h" #include "chrome/views/scroll_view.h" -#include "chrome/views/widget.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" diff --git a/chrome/browser/views/options/cookies_view.h b/chrome/browser/views/options/cookies_view.h index 503bbfa..6d829bb 100644 --- a/chrome/browser/views/options/cookies_view.h +++ b/chrome/browser/views/options/cookies_view.h @@ -5,7 +5,6 @@ #ifndef CHROME_BROWSER_VIEWS_OPTIONS_COOKIES_VIEW_H__ #define CHROME_BROWSER_VIEWS_OPTIONS_COOKIES_VIEW_H__ -#include "base/task.h" #include "chrome/views/dialog_delegate.h" #include "chrome/views/native_button.h" #include "chrome/views/table_view.h" diff --git a/chrome/browser/views/page_info_window.cc b/chrome/browser/views/page_info_window.cc index 99a44c3..ad7f1cc 100644 --- a/chrome/browser/views/page_info_window.cc +++ b/chrome/browser/views/page_info_window.cc @@ -670,7 +670,7 @@ void PageInfoWindow::ShowCertDialog(int cert_id) { view_info.dwSize = sizeof(view_info); // We set our parent to the tab window. This makes the cert dialog created // in CryptUIDlgViewCertificate modal to the browser. - view_info.hwndParent = window()->GetNativeWindow(); + view_info.hwndParent = window()->owning_window(); view_info.dwFlags = CRYPTUI_DISABLE_EDITPROPERTIES | CRYPTUI_DISABLE_ADDTOSTORE; view_info.pCertContext = cert->os_cert_handle(); diff --git a/chrome/browser/views/shelf_item_dialog.cc b/chrome/browser/views/shelf_item_dialog.cc index eed4742..162076b 100644 --- a/chrome/browser/views/shelf_item_dialog.cc +++ b/chrome/browser/views/shelf_item_dialog.cc @@ -21,7 +21,6 @@ #include "chrome/views/grid_layout.h" #include "chrome/views/label.h" #include "chrome/views/text_field.h" -#include "chrome/views/widget.h" #include "grit/generated_resources.h" #include "grit/locale_settings.h" #include "grit/theme_resources.h" diff --git a/chrome/browser/views/tabs/tab_renderer.cc b/chrome/browser/views/tabs/tab_renderer.cc index 654acea..f1c0e07 100644 --- a/chrome/browser/views/tabs/tab_renderer.cc +++ b/chrome/browser/views/tabs/tab_renderer.cc @@ -15,8 +15,6 @@ #include "chrome/common/l10n_util.h" #include "chrome/common/resource_bundle.h" #include "chrome/common/win_util.h" -#include "chrome/views/non_client_view.h" -#include "chrome/views/widget.h" #include "chrome/views/window.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" @@ -501,7 +499,7 @@ void TabRenderer::OnMouseExited(const views::MouseEvent& e) { void TabRenderer::ThemeChanged() { if (GetWidget() && GetWidget()->AsWindow()) - LoadTabImages(GetWidget()->AsWindow()->GetNonClientView()->UseNativeFrame()); + LoadTabImages(GetWidget()->AsWindow()->UseNativeFrame()); View::ThemeChanged(); } @@ -536,7 +534,7 @@ void TabRenderer::PaintTabBackground(ChromeCanvas* canvas) { animation = pulse_animation_.get(); if (animation->GetCurrentValue() > 0) { PaintHoverTabBackground(canvas, animation->GetCurrentValue() * - (GetWidget()->AsWindow()->GetNonClientView()->UseNativeFrame() ? + (GetWidget()->AsWindow()->UseNativeFrame() ? kHoverOpacityVista : kHoverOpacity)); } else { PaintInactiveTabBackground(canvas); diff --git a/chrome/browser/views/tabs/tab_strip.cc b/chrome/browser/views/tabs/tab_strip.cc index d2d4beb..7b26c78 100644 --- a/chrome/browser/views/tabs/tab_strip.cc +++ b/chrome/browser/views/tabs/tab_strip.cc @@ -25,7 +25,6 @@ #include "chrome/common/win_util.h" #include "chrome/views/image_view.h" #include "chrome/views/painter.h" -#include "chrome/views/non_client_view.h" #include "chrome/views/window.h" #include "grit/generated_resources.h" #include "grit/theme_resources.h" @@ -599,7 +598,7 @@ void TabStrip::PaintChildren(ChromeCanvas* canvas) { } } - if (GetWidget()->AsWindow()->GetNonClientView()->UseNativeFrame()) { + if (GetWidget()->AsWindow()->UseNativeFrame()) { // Make sure unselected tabs are somewhat transparent. SkPaint paint; paint.setColor(SkColorSetARGB(200, 255, 255, 255)); diff --git a/chrome/browser/views/toolbar_view.cc b/chrome/browser/views/toolbar_view.cc index 02495fc..6b8e048 100644 --- a/chrome/browser/views/toolbar_view.cc +++ b/chrome/browser/views/toolbar_view.cc @@ -354,7 +354,7 @@ void BrowserToolbarView::Paint(ChromeCanvas* 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 (GetWidget()->AsWindow()->GetNonClientView()->UseNativeFrame()) + if (GetWidget()->AsWindow()->UseNativeFrame()) canvas->FillRectInt(SK_ColorBLACK, 0, height() - 1, width(), 1); } @@ -498,8 +498,8 @@ gfx::Size BrowserToolbarView::GetPreferredSize() { } int vertical_spacing = PopupTopSpacing() + - (GetWidget()->AsWindow()->GetNonClientView()->UseNativeFrame() ? - kPopupBottomSpacingGlass : kPopupBottomSpacingNonGlass); + (GetWidget()->AsWindow()->UseNativeFrame() ? kPopupBottomSpacingGlass + : kPopupBottomSpacingNonGlass); return gfx::Size(0, location_bar_->GetPreferredSize().height() + vertical_spacing); } @@ -810,8 +810,8 @@ void BrowserToolbarView::ButtonPressed(views::BaseButton* sender) { // static int BrowserToolbarView::PopupTopSpacing() { - return GetWidget()->AsWindow()->GetNonClientView()->UseNativeFrame() ? - 0 : kPopupTopSpacingNonGlass; + return GetWidget()->AsWindow()->UseNativeFrame() ? 0 + : kPopupTopSpacingNonGlass; } void BrowserToolbarView::Observe(NotificationType type, diff --git a/chrome/browser/views/user_data_dir_dialog.cc b/chrome/browser/views/user_data_dir_dialog.cc index f6f814d..bc0db29 100644 --- a/chrome/browser/views/user_data_dir_dialog.cc +++ b/chrome/browser/views/user_data_dir_dialog.cc @@ -6,7 +6,6 @@ #include "chrome/browser/views/user_data_dir_dialog.h" #include "chrome/common/l10n_util.h" #include "chrome/views/message_box_view.h" -#include "chrome/views/widget.h" #include "chrome/views/window.h" #include "grit/chromium_strings.h" #include "grit/generated_resources.h" |