[Metrics] Make MetricsStateManager take a callback param to check if UMA is enabled.
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / browser_frame_ash.h
blobf64ac7f3f3dbf7ba1372fb29235c6524ba6e2e86
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"
13 class BrowserFrame;
14 class BrowserView;
16 ////////////////////////////////////////////////////////////////////////////////
17 // BrowserFrameAsh
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 {
24 public:
25 static const char kWindowName[];
27 BrowserFrameAsh(BrowserFrame* browser_frame, BrowserView* browser_view);
29 BrowserView* browser_view() const { return browser_view_; }
31 protected:
32 // Overridden from views::NativeWidgetAura:
33 virtual void OnWindowDestroying(aura::Window* window) OVERRIDE;
34 virtual void OnWindowTargetVisibilityChanged(bool visible) OVERRIDE;
36 // Overridden from NativeBrowserFrame:
37 virtual views::NativeWidget* AsNativeWidget() OVERRIDE;
38 virtual const views::NativeWidget* AsNativeWidget() const OVERRIDE;
39 virtual bool UsesNativeSystemMenu() const OVERRIDE;
40 virtual int GetMinimizeButtonOffset() const OVERRIDE;
41 virtual bool ShouldSaveWindowPlacement() const OVERRIDE;
42 virtual void GetWindowPlacement(
43 gfx::Rect* bounds,
44 ui::WindowShowState* show_state) const OVERRIDE;
47 virtual ~BrowserFrameAsh();
49 private:
50 class WindowPropertyWatcher;
52 // Set the window into the auto managed mode.
53 void SetWindowAutoManaged();
55 // The BrowserView is our ClientView. This is a pointer to it.
56 BrowserView* browser_view_;
58 DISALLOW_COPY_AND_ASSIGN(BrowserFrameAsh);
61 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_ASH_H_