Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(6176)

Unified Diff: chrome/browser/ui/views/frame/browser_frame.h

Issue 7015051: Re-land: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/frame/browser_frame.h
===================================================================
--- chrome/browser/ui/views/frame/browser_frame.h (revision 85284)
+++ chrome/browser/ui/views/frame/browser_frame.h (working copy)
@@ -10,6 +10,7 @@
#include "base/logging.h"
#include "build/build_config.h"
#include "chrome/browser/ui/views/frame/native_browser_frame_delegate.h"
+#include "views/window/window.h"
class AeroGlassNonClientView;
class BrowserNonClientFrameView;
@@ -34,19 +35,15 @@
}
// This is a virtual interface that allows system specific browser frames.
-class BrowserFrame : public NativeBrowserFrameDelegate {
+class BrowserFrame : public views::Window {
public:
+ explicit BrowserFrame(BrowserView* browser_view);
virtual ~BrowserFrame();
- // Creates the appropriate BrowserFrame for this platform. The returned
- // object is owned by the caller.
- static BrowserFrame* Create(BrowserView* browser_view, Profile* profile);
-
static const gfx::Font& GetTitleFont();
- // Returns the Window associated with this frame. Guaranteed non-NULL after
- // construction.
- views::Window* GetWindow();
+ // Initialize the frame (creates the underlying native window).
+ void InitBrowserFrame();
// 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.
@@ -64,9 +61,6 @@
// Tells the frame to update the throbber.
void UpdateThrobber(bool running);
- // Returns the theme provider for this frame.
- ui::ThemeProvider* GetThemeProviderForFrame() const;
-
// 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.
@@ -79,20 +73,15 @@
// its frame treatment if necessary.
void TabStripDisplayModeChanged();
- protected:
- // Overridden from NativeBrowserFrameDelegate:
- virtual views::RootView* DelegateCreateRootView() OVERRIDE;
- virtual views::NonClientFrameView* DelegateCreateFrameViewForWindow()
- OVERRIDE;
+ // Overridden from views::Window:
+ virtual bool IsMaximized() const OVERRIDE;
+ virtual views::RootView* CreateRootView() OVERRIDE;
+ virtual views::NonClientFrameView* CreateFrameViewForWindow() OVERRIDE;
+ virtual bool GetAccelerator(int command_id,
+ ui::Accelerator* accelerator) OVERRIDE;
+ virtual ui::ThemeProvider* GetThemeProvider() const OVERRIDE;
+ virtual void OnNativeWindowActivationChanged(bool active) OVERRIDE;
- // 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;
- }
-
- explicit BrowserFrame(BrowserView* browser_view);
-
private:
NativeBrowserFrame* native_browser_frame_;
« no previous file with comments | « chrome/browser/ui/views/frame/app_panel_browser_frame_view.cc ('k') | chrome/browser/ui/views/frame/browser_frame.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698