Merge Chromium + Blink git repositories
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / desktop_browser_frame_aura.h
blob3591de6118a57cfbb485015e65ca14988305c014
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;
15 class BrowserFrame;
16 class BrowserView;
18 namespace wm {
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 {
30 public:
31 DesktopBrowserFrameAura(BrowserFrame* browser_frame,
32 BrowserView* browser_view);
34 BrowserView* browser_view() const { return browser_view_; }
35 BrowserFrame* browser_frame() const { return browser_frame_; }
37 protected:
38 ~DesktopBrowserFrameAura() override;
40 // Overridden from views::DesktopNativeWidgetAura:
41 void OnHostClosed() override;
42 void InitNativeWidget(const views::Widget::InitParams& params) override;
44 // Overridden from NativeBrowserFrame:
45 views::Widget::InitParams GetWidgetParams() override;
46 bool UseCustomFrame() const override;
47 bool UsesNativeSystemMenu() const override;
48 int GetMinimizeButtonOffset() const override;
49 bool ShouldSaveWindowPlacement() const override;
50 void GetWindowPlacement(gfx::Rect* bounds,
51 ui::WindowShowState* show_state) const override;
53 private:
54 // The BrowserView is our ClientView. This is a pointer to it.
55 BrowserView* browser_view_;
56 BrowserFrame* browser_frame_;
58 // Owned by the RootWindow.
59 BrowserDesktopWindowTreeHost* browser_desktop_window_tree_host_;
61 scoped_ptr<wm::VisibilityController> visibility_controller_;
63 DISALLOW_COPY_AND_ASSIGN(DesktopBrowserFrameAura);
66 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_DESKTOP_BROWSER_FRAME_AURA_H_