Popular sites on the NTP: check that experiment group StartsWith (rather than IS...
[chromium-blink-merge.git] / chrome / browser / ui / views / frame / browser_frame_mac.h
blobbee39dd5b3224f86c26103d493f53f9d78c0e28d
1 // Copyright 2014 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_MAC_H_
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_MAC_H_
8 #include "chrome/browser/ui/views/frame/native_browser_frame.h"
10 #import "base/mac/scoped_nsobject.h"
11 #include "ui/views/widget/native_widget_mac.h"
13 class BrowserFrame;
14 class BrowserView;
15 @class ChromeCommandDispatcherDelegate;
17 ////////////////////////////////////////////////////////////////////////////////
18 // BrowserFrameMac is a NativeWidgetMac subclass that provides
19 // the window frame for the Chrome browser window.
21 class BrowserFrameMac : public views::NativeWidgetMac,
22 public NativeBrowserFrame {
23 public:
24 BrowserFrameMac(BrowserFrame* browser_frame, BrowserView* browser_view);
26 // Overridden from views::NativeWidgetMac:
27 void OnWindowWillClose() override;
28 int SheetPositionY() override;
29 void InitNativeWidget(const views::Widget::InitParams& params) override;
31 // Overridden from NativeBrowserFrame:
32 views::Widget::InitParams GetWidgetParams() override;
33 bool UseCustomFrame() const override;
34 bool UsesNativeSystemMenu() const override;
35 bool ShouldSaveWindowPlacement() const override;
36 void GetWindowPlacement(gfx::Rect* bounds,
37 ui::WindowShowState* show_state) const override;
39 protected:
40 ~BrowserFrameMac() override;
42 // Overridden from views::NativeWidgetMac:
43 NativeWidgetMacNSWindow* CreateNSWindow(
44 const views::Widget::InitParams& params) override;
46 // Overridden from NativeBrowserFrame:
47 int GetMinimizeButtonOffset() const override;
49 private:
50 BrowserView* browser_view_; // Weak. Our ClientView.
51 base::scoped_nsobject<ChromeCommandDispatcherDelegate>
52 command_dispatcher_delegate_;
54 DISALLOW_COPY_AND_ASSIGN(BrowserFrameMac);
57 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_MAC_H_