diff options
author | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 03:14:34 +0000 |
---|---|---|
committer | ben@chromium.org <ben@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-03-11 03:14:34 +0000 |
commit | 6d39eb5bc69e74394eed3bf3351b8923362d3526 (patch) | |
tree | 4de2e502e1ea9e057ab3502429056be7c029fa0b | |
parent | fa25b24346def401910d13b5c7923306f29c127e (diff) | |
download | chromium_src-6d39eb5bc69e74394eed3bf3351b8923362d3526.zip chromium_src-6d39eb5bc69e74394eed3bf3351b8923362d3526.tar.gz chromium_src-6d39eb5bc69e74394eed3bf3351b8923362d3526.tar.bz2 |
Revert 77773 and 77774.
BUG=none
TBR=sky
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@77776 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/ui/views/frame/browser_frame.cc | 57 | ||||
-rw-r--r-- | chrome/browser/ui/views/frame/browser_frame.h | 53 | ||||
-rw-r--r-- | chrome/browser/ui/views/frame/browser_frame_gtk.cc | 49 | ||||
-rw-r--r-- | chrome/browser/ui/views/frame/browser_frame_gtk.h | 33 | ||||
-rw-r--r-- | chrome/browser/ui/views/frame/browser_frame_win.cc | 144 | ||||
-rw-r--r-- | chrome/browser/ui/views/frame/browser_frame_win.h | 30 | ||||
-rw-r--r-- | chrome/browser/ui/views/frame/native_browser_frame.h | 44 | ||||
-rw-r--r-- | chrome/browser/ui/views/frame/native_browser_frame_delegate.h | 15 | ||||
-rw-r--r-- | chrome/chrome_browser.gypi | 3 | ||||
-rw-r--r-- | views/window/native_window.h | 11 | ||||
-rw-r--r-- | views/window/window_gtk.cc | 4 | ||||
-rw-r--r-- | views/window/window_gtk.h | 1 |
12 files changed, 135 insertions, 309 deletions
diff --git a/chrome/browser/ui/views/frame/browser_frame.cc b/chrome/browser/ui/views/frame/browser_frame.cc deleted file mode 100644 index 9bc3a02..0000000 --- a/chrome/browser/ui/views/frame/browser_frame.cc +++ /dev/null @@ -1,57 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#include "chrome/browser/ui/views/frame/browser_frame.h" - -#include "chrome/browser/ui/views/frame/native_browser_frame.h" -#include "views/window/native_window.h" -#include "views/window/window.h" - -//////////////////////////////////////////////////////////////////////////////// -// BrowserFrame, public: - -BrowserFrame::~BrowserFrame() { -} - -views::Window* BrowserFrame::GetWindow() { - return native_browser_frame_->AsNativeWindow()->GetWindow(); -} - -int BrowserFrame::GetMinimizeButtonOffset() const { - return native_browser_frame_->GetMinimizeButtonOffset(); -} - -gfx::Rect BrowserFrame::GetBoundsForTabStrip(views::View* tabstrip) const { - return native_browser_frame_->GetBoundsForTabStrip(tabstrip); -} - -int BrowserFrame::GetHorizontalTabStripVerticalOffset(bool restored) const { - return native_browser_frame_->GetHorizontalTabStripVerticalOffset(restored); -} - -void BrowserFrame::UpdateThrobber(bool running) { - native_browser_frame_->UpdateThrobber(running); -} - -ui::ThemeProvider* BrowserFrame::GetThemeProviderForFrame() const { - return native_browser_frame_->GetThemeProviderForFrame(); -} - -bool BrowserFrame::AlwaysUseNativeFrame() const { - return native_browser_frame_->AlwaysUseNativeFrame(); -} - -views::View* BrowserFrame::GetFrameView() const { - return native_browser_frame_->GetFrameView(); -} - -void BrowserFrame::TabStripDisplayModeChanged() { - native_browser_frame_->TabStripDisplayModeChanged(); -} - -//////////////////////////////////////////////////////////////////////////////// -// BrowserFrame, protected: - -BrowserFrame::BrowserFrame() : native_browser_frame_(NULL) { -} diff --git a/chrome/browser/ui/views/frame/browser_frame.h b/chrome/browser/ui/views/frame/browser_frame.h index d58a16a..3be0ddd 100644 --- a/chrome/browser/ui/views/frame/browser_frame.h +++ b/chrome/browser/ui/views/frame/browser_frame.h @@ -1,4 +1,4 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. +// Copyright (c) 2010 The Chromium Authors. All rights reserved. // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. @@ -6,32 +6,33 @@ #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ #pragma once -#include "base/logging.h" #include "build/build_config.h" -#include "chrome/browser/ui/views/frame/native_browser_frame_delegate.h" +#include "views/window/non_client_view.h" class BrowserView; -class NativeBrowserFrame; class Profile; namespace gfx { class Font; class Rect; -} +} // namespace gfx namespace ui { class ThemeProvider; } namespace views { -class View; class Window; -} + +#if defined(OS_WIN) +class WindowWin; +#endif +} // namespace views // This is a virtual interface that allows system specific browser frames. -class BrowserFrame : public NativeBrowserFrameDelegate { +class BrowserFrame { public: - virtual ~BrowserFrame(); + virtual ~BrowserFrame() {} // Creates the appropriate BrowserFrame for this platform. The returned // object is owned by the caller. @@ -39,54 +40,40 @@ class BrowserFrame : public NativeBrowserFrameDelegate { static const gfx::Font& GetTitleFont(); - // Returns the Window associated with this frame. Guaranteed non-NULL after + // Returns the Window associated with this frame. Guraranteed non-NULL after // construction. - views::Window* GetWindow(); + virtual views::Window* GetWindow() = 0; // Determine the distance of the left edge of the minimize button from the // left edge of the window. Used in our Non-Client View's Layout. - int GetMinimizeButtonOffset() const; + virtual int GetMinimizeButtonOffset() const = 0; // Retrieves the bounds, in non-client view coordinates for the specified // TabStrip view. - gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const; + virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const = 0; // Returns the y coordinate within the window at which the horizontal TabStrip // begins (or would begin). If |restored| is true, this is calculated as if // we were in restored mode regardless of the current mode. - int GetHorizontalTabStripVerticalOffset(bool restored) const; + virtual int GetHorizontalTabStripVerticalOffset(bool restored) const = 0; // Tells the frame to update the throbber. - void UpdateThrobber(bool running); + virtual void UpdateThrobber(bool running) = 0; // Returns the theme provider for this frame. - ui::ThemeProvider* GetThemeProviderForFrame() const; + virtual ui::ThemeProvider* GetThemeProviderForFrame() const = 0; // Returns true if the window should use the native frame view. This is true // if there are no themes applied on Vista, or if there are themes applied and // this browser window is an app or popup. - bool AlwaysUseNativeFrame() const; + virtual bool AlwaysUseNativeFrame() const = 0; // Returns the NonClientFrameView of this frame. - views::View* GetFrameView() const; + virtual views::View* GetFrameView() const = 0; // Notifies the frame that the tab strip display mode changed so it can update // its frame treatment if necessary. - void TabStripDisplayModeChanged(); - - protected: - // TODO(beng): Temporarily provided as a way to associate the subclass' - // implementation of NativeBrowserFrame with this. - void set_native_browser_frame(NativeBrowserFrame* native_browser_frame) { - native_browser_frame_ = native_browser_frame; - } - - BrowserFrame(); - - private: - NativeBrowserFrame* native_browser_frame_; - - DISALLOW_COPY_AND_ASSIGN(BrowserFrame); + virtual void TabStripDisplayModeChanged() = 0; }; #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_H_ diff --git a/chrome/browser/ui/views/frame/browser_frame_gtk.cc b/chrome/browser/ui/views/frame/browser_frame_gtk.cc index b7d3888..6c8da688 100644 --- a/chrome/browser/ui/views/frame/browser_frame_gtk.cc +++ b/chrome/browser/ui/views/frame/browser_frame_gtk.cc @@ -38,7 +38,6 @@ BrowserFrameGtk::BrowserFrameGtk(BrowserView* browser_view, Profile* profile) browser_frame_view_(NULL), root_view_(NULL), profile_(profile) { - set_native_browser_frame(this); browser_view_->set_frame(this); } @@ -55,33 +54,7 @@ void BrowserFrameGtk::InitBrowserFrame() { // Don't focus anything on creation, selecting a tab will set the focus. } -ThemeProvider* BrowserFrameGtk::GetThemeProvider() const { - return profile_->GetThemeProvider(); -} - -views::RootView* BrowserFrameGtk::CreateRootView() { - root_view_ = new BrowserRootView(browser_view_, this); - return root_view_; -} - -void BrowserFrameGtk::IsActiveChanged() { - GetRootView()->SchedulePaint(); - browser_view_->ActivationChanged(IsActive()); - views::WidgetGtk::IsActiveChanged(); -} - -void BrowserFrameGtk::SetInitialFocus() { - browser_view_->RestoreFocus(); -} - -//////////////////////////////////////////////////////////////////////////////// -// BrowserFrameGtk, NativeBrowserFrame implementation: - -views::NativeWindow* BrowserFrameGtk::AsNativeWindow() { - return this; -} - -const views::NativeWindow* BrowserFrameGtk::AsNativeWindow() const { +views::Window* BrowserFrameGtk::GetWindow() { return this; } @@ -124,8 +97,24 @@ void BrowserFrameGtk::TabStripDisplayModeChanged() { GetRootView()->Layout(); } -//////////////////////////////////////////////////////////////////////////////// -// BrowserFrameGtk, private: +ThemeProvider* BrowserFrameGtk::GetThemeProvider() const { + return profile_->GetThemeProvider(); +} + +views::RootView* BrowserFrameGtk::CreateRootView() { + root_view_ = new BrowserRootView(browser_view_, this); + return root_view_; +} + +void BrowserFrameGtk::IsActiveChanged() { + GetRootView()->SchedulePaint(); + browser_view_->ActivationChanged(IsActive()); + views::WidgetGtk::IsActiveChanged(); +} + +void BrowserFrameGtk::SetInitialFocus() { + browser_view_->RestoreFocus(); +} bool BrowserFrameGtk::GetAccelerator(int cmd_id, ui::Accelerator* accelerator) { diff --git a/chrome/browser/ui/views/frame/browser_frame_gtk.h b/chrome/browser/ui/views/frame/browser_frame_gtk.h index 6bec934..109a6a0 100644 --- a/chrome/browser/ui/views/frame/browser_frame_gtk.h +++ b/chrome/browser/ui/views/frame/browser_frame_gtk.h @@ -8,15 +8,13 @@ #include "base/basictypes.h" #include "chrome/browser/ui/views/frame/browser_frame.h" -#include "chrome/browser/ui/views/frame/native_browser_frame.h" #include "views/window/window_gtk.h" class BrowserNonClientFrameView; class BrowserRootView; class BrowserFrameGtk : public BrowserFrame, - public views::WindowGtk, - public NativeBrowserFrame { + public views::WindowGtk { public: // Normally you will create this class by calling BrowserFrame::Create. // Init must be called before using this class, which Create will do for you. @@ -29,24 +27,23 @@ class BrowserFrameGtk : public BrowserFrame, // constructor. virtual void InitBrowserFrame(); + // Overridden from BrowserFrame: + virtual views::Window* GetWindow(); + virtual int GetMinimizeButtonOffset() const; + virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const; + virtual int GetHorizontalTabStripVerticalOffset(bool restored) const; + virtual void UpdateThrobber(bool running); + virtual ui::ThemeProvider* GetThemeProviderForFrame() const; + virtual bool AlwaysUseNativeFrame() const; + virtual views::View* GetFrameView() const; + virtual void TabStripDisplayModeChanged(); + // Overridden from views::Widget: - virtual ui::ThemeProvider* GetThemeProvider() const OVERRIDE; - virtual void IsActiveChanged() OVERRIDE; - virtual void SetInitialFocus() OVERRIDE; + virtual ui::ThemeProvider* GetThemeProvider() const; + virtual void IsActiveChanged(); + virtual void SetInitialFocus(); protected: - // Overridden from NativeBrowserFrame: - virtual views::NativeWindow* AsNativeWindow() OVERRIDE; - virtual const views::NativeWindow* AsNativeWindow() const OVERRIDE; - virtual int GetMinimizeButtonOffset() const OVERRIDE; - virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE; - virtual int GetHorizontalTabStripVerticalOffset(bool restored) const OVERRIDE; - virtual void UpdateThrobber(bool running) OVERRIDE; - virtual ui::ThemeProvider* GetThemeProviderForFrame() const OVERRIDE; - virtual bool AlwaysUseNativeFrame() const OVERRIDE; - virtual views::View* GetFrameView() const OVERRIDE; - virtual void TabStripDisplayModeChanged() OVERRIDE; - void set_browser_frame_view(BrowserNonClientFrameView* browser_frame_view) { browser_frame_view_ = browser_frame_view; } diff --git a/chrome/browser/ui/views/frame/browser_frame_win.cc b/chrome/browser/ui/views/frame/browser_frame_win.cc index a51eb25..139007a 100644 --- a/chrome/browser/ui/views/frame/browser_frame_win.cc +++ b/chrome/browser/ui/views/frame/browser_frame_win.cc @@ -47,9 +47,7 @@ BrowserFrame* BrowserFrame::Create(BrowserView* browser_view, BrowserFrameWin::BrowserFrameWin(BrowserView* browser_view, Profile* profile) : WindowWin(browser_view), browser_view_(browser_view), - root_view_(NULL), - ALLOW_THIS_IN_INITIALIZER_LIST(delegate_(this)) { - set_native_browser_frame(this); + root_view_(NULL) { browser_view_->set_frame(this); non_client_view()->SetFrameView(CreateFrameViewForWindow()); // Don't focus anything on creation, selecting a tab will set the focus. @@ -68,6 +66,74 @@ void BrowserFrameWin::SetShowState(int state) { explicit_show_state = state; } +//////////////////////////////////////////////////////////////////////////////// +// BrowserFrameWin, BrowserFrame implementation: + +views::Window* BrowserFrameWin::GetWindow() { + return this; +} + +int BrowserFrameWin::GetMinimizeButtonOffset() const { + TITLEBARINFOEX titlebar_info; + titlebar_info.cbSize = sizeof(TITLEBARINFOEX); + SendMessage(GetNativeView(), WM_GETTITLEBARINFOEX, 0, (WPARAM)&titlebar_info); + + CPoint minimize_button_corner(titlebar_info.rgrect[2].left, + titlebar_info.rgrect[2].top); + MapWindowPoints(HWND_DESKTOP, GetNativeView(), &minimize_button_corner, 1); + + return minimize_button_corner.x; +} + +gfx::Rect BrowserFrameWin::GetBoundsForTabStrip(views::View* tabstrip) const { + return browser_frame_view_->GetBoundsForTabStrip(tabstrip); +} + +int BrowserFrameWin::GetHorizontalTabStripVerticalOffset(bool restored) const { + return browser_frame_view_->GetHorizontalTabStripVerticalOffset(restored); +} + +void BrowserFrameWin::UpdateThrobber(bool running) { + browser_frame_view_->UpdateThrobber(running); +} + +ThemeProvider* BrowserFrameWin::GetThemeProviderForFrame() const { + // This is implemented for a different interface than GetThemeProvider is, + // but they mean the same things. + return GetThemeProvider(); +} + +bool BrowserFrameWin::AlwaysUseNativeFrame() const { + // App panel windows draw their own frame. + if (browser_view_->IsBrowserTypePanel()) + return false; + + // We don't theme popup or app windows, so regardless of whether or not a + // theme is active for normal browser windows, we don't want to use the custom + // frame for popups/apps. + if (!browser_view_->IsBrowserTypeNormal() && + views::WidgetWin::IsAeroGlassEnabled()) + return true; + + // Otherwise, we use the native frame when we're told we should by the theme + // provider (e.g. no custom theme is active). + return GetThemeProvider()->ShouldUseNativeFrame(); +} + +views::View* BrowserFrameWin::GetFrameView() const { + return browser_frame_view_; +} + +void BrowserFrameWin::TabStripDisplayModeChanged() { + if (GetRootView()->has_children()) { + // Make sure the child of the root view gets Layout again. + GetRootView()->GetChildViewAt(0)->InvalidateLayout(); + } + GetRootView()->Layout(); + + UpdateDWMFrame(); +} + /////////////////////////////////////////////////////////////////////////////// // BrowserFrameWin, views::WindowWin overrides: @@ -221,78 +287,6 @@ views::RootView* BrowserFrameWin::CreateRootView() { return root_view_; } -//////////////////////////////////////////////////////////////////////////////// -// BrowserFrameWin, NativeBrowserFrame implementation: - -views::NativeWindow* BrowserFrameWin::AsNativeWindow() { - return this; -} - -const views::NativeWindow* BrowserFrameWin::AsNativeWindow() const { - return this; -} - -int BrowserFrameWin::GetMinimizeButtonOffset() const { - TITLEBARINFOEX titlebar_info; - titlebar_info.cbSize = sizeof(TITLEBARINFOEX); - SendMessage(GetNativeView(), WM_GETTITLEBARINFOEX, 0, (WPARAM)&titlebar_info); - - CPoint minimize_button_corner(titlebar_info.rgrect[2].left, - titlebar_info.rgrect[2].top); - MapWindowPoints(HWND_DESKTOP, GetNativeView(), &minimize_button_corner, 1); - - return minimize_button_corner.x; -} - -gfx::Rect BrowserFrameWin::GetBoundsForTabStrip(views::View* tabstrip) const { - return browser_frame_view_->GetBoundsForTabStrip(tabstrip); -} - -int BrowserFrameWin::GetHorizontalTabStripVerticalOffset(bool restored) const { - return browser_frame_view_->GetHorizontalTabStripVerticalOffset(restored); -} - -void BrowserFrameWin::UpdateThrobber(bool running) { - browser_frame_view_->UpdateThrobber(running); -} - -ui::ThemeProvider* BrowserFrameWin::GetThemeProviderForFrame() const { - // This is implemented for a different interface than GetThemeProvider is, - // but they mean the same things. - return GetThemeProvider(); -} - -bool BrowserFrameWin::AlwaysUseNativeFrame() const { - // App panel windows draw their own frame. - if (browser_view_->IsBrowserTypePanel()) - return false; - - // We don't theme popup or app windows, so regardless of whether or not a - // theme is active for normal browser windows, we don't want to use the custom - // frame for popups/apps. - if (!browser_view_->IsBrowserTypeNormal() && - views::WidgetWin::IsAeroGlassEnabled()) - return true; - - // Otherwise, we use the native frame when we're told we should by the theme - // provider (e.g. no custom theme is active). - return GetThemeProvider()->ShouldUseNativeFrame(); -} - -views::View* BrowserFrameWin::GetFrameView() const { - return browser_frame_view_; -} - -void BrowserFrameWin::TabStripDisplayModeChanged() { - if (GetRootView()->has_children()) { - // Make sure the child of the root view gets Layout again. - GetRootView()->GetChildViewAt(0)->InvalidateLayout(); - } - GetRootView()->Layout(); - - UpdateDWMFrame(); -} - /////////////////////////////////////////////////////////////////////////////// // BrowserFrameWin, private: diff --git a/chrome/browser/ui/views/frame/browser_frame_win.h b/chrome/browser/ui/views/frame/browser_frame_win.h index d0a1e88..068f21f 100644 --- a/chrome/browser/ui/views/frame/browser_frame_win.h +++ b/chrome/browser/ui/views/frame/browser_frame_win.h @@ -8,7 +8,6 @@ #include "base/basictypes.h" #include "chrome/browser/ui/views/frame/browser_frame.h" -#include "chrome/browser/ui/views/frame/native_browser_frame.h" #include "views/window/window_win.h" class AeroGlassNonClientView; @@ -24,9 +23,7 @@ class Profile; // BrowserFrame is a WindowWin subclass that provides the window frame for the // Chrome browser window. // -class BrowserFrameWin : public BrowserFrame, - public views::WindowWin, - public NativeBrowserFrame { +class BrowserFrameWin : public BrowserFrame, public views::WindowWin { public: // Normally you will create this class by calling BrowserFrame::Create. // Init must be called before using this class, which Create will do for you. @@ -44,6 +41,17 @@ class BrowserFrameWin : public BrowserFrame, // otherwise. static void SetShowState(int state); + // Overridden from BrowserFrame: + virtual views::Window* GetWindow() OVERRIDE; + virtual int GetMinimizeButtonOffset() const OVERRIDE; + virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE; + virtual int GetHorizontalTabStripVerticalOffset(bool restored) const OVERRIDE; + virtual void UpdateThrobber(bool running) OVERRIDE; + virtual ui::ThemeProvider* GetThemeProviderForFrame() const OVERRIDE; + virtual bool AlwaysUseNativeFrame() const OVERRIDE; + virtual views::View* GetFrameView() const OVERRIDE; + virtual void TabStripDisplayModeChanged() OVERRIDE; + protected: // Overridden from views::WindowWin: virtual int GetShowState() const OVERRIDE; @@ -74,18 +82,6 @@ class BrowserFrameWin : public BrowserFrame, virtual void UpdateFrameAfterFrameChange() OVERRIDE; virtual views::RootView* CreateRootView() OVERRIDE; - // Overridden from NativeBrowserFrame: - virtual views::NativeWindow* AsNativeWindow() OVERRIDE; - virtual const views::NativeWindow* AsNativeWindow() const OVERRIDE; - virtual int GetMinimizeButtonOffset() const OVERRIDE; - virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const OVERRIDE; - virtual int GetHorizontalTabStripVerticalOffset(bool restored) const OVERRIDE; - virtual void UpdateThrobber(bool running) OVERRIDE; - virtual ui::ThemeProvider* GetThemeProviderForFrame() const OVERRIDE; - virtual bool AlwaysUseNativeFrame() const OVERRIDE; - virtual views::View* GetFrameView() const OVERRIDE; - virtual void TabStripDisplayModeChanged() OVERRIDE; - private: // Updates the DWM with the frame bounds. void UpdateDWMFrame(); @@ -101,8 +97,6 @@ class BrowserFrameWin : public BrowserFrame, // functions that only exist on BrowserRootView (versus RootView). BrowserRootView* root_view_; - NativeBrowserFrameDelegate* delegate_; - DISALLOW_COPY_AND_ASSIGN(BrowserFrameWin); }; diff --git a/chrome/browser/ui/views/frame/native_browser_frame.h b/chrome/browser/ui/views/frame/native_browser_frame.h deleted file mode 100644 index 1759e55..0000000 --- a/chrome/browser/ui/views/frame/native_browser_frame.h +++ /dev/null @@ -1,44 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ -#define CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ -#pragma once - -namespace gfx { -class Rect; -} - -namespace ui { -class ThemeProvider; -} - -namespace views { -class NativeWindow; -class View; -} - -class NativeBrowserFrame { - public: - virtual ~NativeBrowserFrame() {} - - virtual views::NativeWindow* AsNativeWindow() = 0; - virtual const views::NativeWindow* AsNativeWindow() const = 0; - - protected: - friend class BrowserFrame; - - // BrowserFrame pass-thrus --------------------------------------------------- - // See browser_frame.h for documentation: - virtual int GetMinimizeButtonOffset() const = 0; - virtual gfx::Rect GetBoundsForTabStrip(views::View* tabstrip) const = 0; - virtual int GetHorizontalTabStripVerticalOffset(bool restored) const = 0; - virtual void UpdateThrobber(bool running) = 0; - virtual ui::ThemeProvider* GetThemeProviderForFrame() const = 0; - virtual bool AlwaysUseNativeFrame() const = 0; - virtual views::View* GetFrameView() const = 0; - virtual void TabStripDisplayModeChanged() = 0; -}; - -#endif // CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ diff --git a/chrome/browser/ui/views/frame/native_browser_frame_delegate.h b/chrome/browser/ui/views/frame/native_browser_frame_delegate.h deleted file mode 100644 index 10c32dd..0000000 --- a/chrome/browser/ui/views/frame/native_browser_frame_delegate.h +++ /dev/null @@ -1,15 +0,0 @@ -// Copyright (c) 2011 The Chromium Authors. All rights reserved. -// Use of this source code is governed by a BSD-style license that can be -// found in the LICENSE file. - -#ifndef CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_DELEGATE_H_ -#define CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_DELEGATE_H_ -#pragma once - -class NativeBrowserFrameDelegate { - public: - virtual ~NativeBrowserFrameDelegate() {} - -}; - -#endif // CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_DELEGATE_H_ diff --git a/chrome/chrome_browser.gypi b/chrome/chrome_browser.gypi index 7c3a2a1..6dd5391 100644 --- a/chrome/chrome_browser.gypi +++ b/chrome/chrome_browser.gypi @@ -2925,7 +2925,6 @@ 'browser/ui/views/frame/app_panel_browser_frame_view.h', 'browser/ui/views/frame/browser_bubble_host.cc', 'browser/ui/views/frame/browser_bubble_host.h', - 'browser/ui/views/frame/browser_frame.cc', 'browser/ui/views/frame/browser_frame.h', 'browser/ui/views/frame/browser_frame_gtk.cc', 'browser/ui/views/frame/browser_frame_gtk.h', @@ -2944,8 +2943,6 @@ 'browser/ui/views/frame/contents_container.h', 'browser/ui/views/frame/glass_browser_frame_view.cc', 'browser/ui/views/frame/glass_browser_frame_view.h', - 'browser/ui/views/frame/native_browser_frame.h', - 'browser/ui/views/frame/native_browser_frame_delegate.h', 'browser/ui/views/frame/opaque_browser_frame_view.cc', 'browser/ui/views/frame/opaque_browser_frame_view.h', 'browser/ui/views/frame/popup_non_client_frame_view.cc', diff --git a/views/window/native_window.h b/views/window/native_window.h index 9236689..6275e1a 100644 --- a/views/window/native_window.h +++ b/views/window/native_window.h @@ -6,19 +6,10 @@ #define VIEWS_WIDGET_NATIVE_WINDOW_H_ #pragma once -#include "ui/gfx/native_widget_types.h" #include "views/accessibility/accessibility_types.h" -class SkBitmap; - -namespace gfx { -class Rect; -class Size; -} - namespace views { -class NativeWidget; class NonClientFrameView; //////////////////////////////////////////////////////////////////////////////// @@ -35,8 +26,6 @@ class NativeWindow { virtual ~NativeWindow() {} - virtual Window* GetWindow() = 0; - protected: friend class Window; diff --git a/views/window/window_gtk.cc b/views/window/window_gtk.cc index 5e625a6..a24ce61 100644 --- a/views/window/window_gtk.cc +++ b/views/window/window_gtk.cc @@ -300,10 +300,6 @@ const NativeWidget* WindowGtk::AsNativeWidget() const { return this; } -Window* WindowGtk::GetWindow() { - return this; -} - void WindowGtk::SetWindowBounds(const gfx::Rect& bounds, gfx::NativeWindow other_window) { // TODO: need to deal with other_window. diff --git a/views/window/window_gtk.h b/views/window/window_gtk.h index 5e9915a..1797bf8 100644 --- a/views/window/window_gtk.h +++ b/views/window/window_gtk.h @@ -60,7 +60,6 @@ class WindowGtk : public WidgetGtk, public NativeWindow, public Window { virtual void SetAccessibleState(AccessibilityTypes::State state) OVERRIDE; virtual NativeWidget* AsNativeWidget() OVERRIDE; virtual const NativeWidget* AsNativeWidget() const OVERRIDE; - virtual Window* GetWindow() OVERRIDE; virtual void SetWindowBounds(const gfx::Rect& bounds, gfx::NativeWindow other_window) OVERRIDE; virtual void HideWindow() OVERRIDE; |