[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / desktop_browser_frame_aura.h
blobbba21fb030334f8897060e5867e6880ad9a62d05
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_; }
36 protected:
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(
51 gfx::Rect* bounds,
52 ui::WindowShowState* show_state) const OVERRIDE;
54 private:
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_