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"
9 #include "ui/views/widget/native_widget_mac.h"
14 ////////////////////////////////////////////////////////////////////////////////
15 // BrowserFrameMac is a NativeWidgetMac subclass that provides
16 // the window frame for the Chrome browser window.
18 class BrowserFrameMac
: public views::NativeWidgetMac
,
19 public NativeBrowserFrame
{
21 BrowserFrameMac(BrowserFrame
* browser_frame
, BrowserView
* browser_view
);
23 // Overridden from views::NativeWidgetMac:
24 void OnWindowWillClose() override
;
25 void InitNativeWidget(const views::Widget::InitParams
& params
) override
;
27 // Overridden from NativeBrowserFrame:
28 views::Widget::InitParams
GetWidgetParams() override
;
29 bool UseCustomFrame() const override
;
30 bool UsesNativeSystemMenu() const override
;
31 bool ShouldSaveWindowPlacement() const override
;
32 void GetWindowPlacement(gfx::Rect
* bounds
,
33 ui::WindowShowState
* show_state
) const override
;
36 ~BrowserFrameMac() override
;
38 // Overridden from views::NativeWidgetMac:
39 gfx::NativeWindow
CreateNSWindow(
40 const views::Widget::InitParams
& params
) override
;
42 // Overridden from NativeBrowserFrame:
43 int GetMinimizeButtonOffset() const override
;
46 BrowserView
* browser_view_
; // Weak. Our ClientView.
48 DISALLOW_COPY_AND_ASSIGN(BrowserFrameMac
);
51 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_BROWSER_FRAME_MAC_H_