1 // Copyright 2013 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_ASH_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_ASH_H_
8 #include "base/basictypes.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/ui/views/frame/native_browser_frame.h"
11 #include "ui/views/widget/native_widget_aura.h"
16 ////////////////////////////////////////////////////////////////////////////////
19 // BrowserFrameAsh is a NativeWidgetAura subclass that provides the window
20 // frame for the Chrome browser window.
22 class BrowserFrameAsh
: public views::NativeWidgetAura
,
23 public NativeBrowserFrame
{
25 static const char kWindowName
[];
27 BrowserFrameAsh(BrowserFrame
* browser_frame
, BrowserView
* browser_view
);
29 BrowserView
* browser_view() const { return browser_view_
; }
32 // Overridden from views::NativeWidgetAura:
33 void OnWindowDestroying(aura::Window
* window
) override
;
34 void OnWindowTargetVisibilityChanged(bool visible
) override
;
36 // Overridden from NativeBrowserFrame:
37 views::Widget::InitParams
GetWidgetParams() override
;
38 bool UseCustomFrame() const override
;
39 bool UsesNativeSystemMenu() const override
;
40 int GetMinimizeButtonOffset() const override
;
41 bool ShouldSaveWindowPlacement() const override
;
42 void GetWindowPlacement(gfx::Rect
* bounds
,
43 ui::WindowShowState
* show_state
) const override
;
45 ~BrowserFrameAsh() override
;
48 class WindowPropertyWatcher
;
50 // Set the window into the auto managed mode.
51 void SetWindowAutoManaged();
53 // The BrowserView is our ClientView. This is a pointer to it.
54 BrowserView
* browser_view_
;
56 DISALLOW_COPY_AND_ASSIGN(BrowserFrameAsh
);
59 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_ASH_H_