1 // Copyright (c) 2012 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_DESKTOP_BROWSER_FRAME_AURA_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_DESKTOP_BROWSER_FRAME_AURA_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/context_menu_controller.h"
12 #include "ui/views/widget/desktop_aura/desktop_native_widget_aura.h"
14 class BrowserDesktopWindowTreeHost
;
19 class VisibilityController
;
22 ////////////////////////////////////////////////////////////////////////////////
23 // DesktopBrowserFrameAura
25 // DesktopBrowserFrameAura is a DesktopNativeWidgetAura subclass that provides
26 // the window frame for the Chrome browser window.
28 class DesktopBrowserFrameAura
: public views::DesktopNativeWidgetAura
,
29 public NativeBrowserFrame
{
31 DesktopBrowserFrameAura(BrowserFrame
* browser_frame
,
32 BrowserView
* browser_view
);
34 BrowserView
* browser_view() const { return browser_view_
; }
37 virtual ~DesktopBrowserFrameAura();
39 // Overridden from views::DesktopNativeWidgetAura:
40 virtual void OnHostClosed() OVERRIDE
;
41 virtual void InitNativeWidget(
42 const views::Widget::InitParams
& params
) OVERRIDE
;
44 // Overridden from NativeBrowserFrame:
45 virtual views::NativeWidget
* AsNativeWidget() OVERRIDE
;
46 virtual const views::NativeWidget
* AsNativeWidget() const OVERRIDE
;
47 virtual bool UsesNativeSystemMenu() const OVERRIDE
;
48 virtual int GetMinimizeButtonOffset() const OVERRIDE
;
49 virtual bool ShouldSaveWindowPlacement() const OVERRIDE
;
50 virtual void GetWindowPlacement(
52 ui::WindowShowState
* show_state
) const OVERRIDE
;
55 // The BrowserView is our ClientView. This is a pointer to it.
56 BrowserView
* browser_view_
;
57 BrowserFrame
* browser_frame_
;
59 // Owned by the RootWindow.
60 BrowserDesktopWindowTreeHost
* browser_desktop_window_tree_host_
;
62 scoped_ptr
<wm::VisibilityController
> visibility_controller_
;
64 DISALLOW_COPY_AND_ASSIGN(DesktopBrowserFrameAura
);
67 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_DESKTOP_BROWSER_FRAME_AURA_H_