OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ |
6 #define CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ |
7 | 7 |
8 #include "ui/base/ui_base_types.h" | 8 #include "ui/base/ui_base_types.h" |
9 #include "ui/gfx/geometry/rect.h" | 9 #include "ui/gfx/geometry/rect.h" |
10 #include "ui/views/widget/widget.h" | 10 #include "ui/views/widget/widget.h" |
11 | 11 |
12 class BrowserFrame; | 12 class BrowserFrame; |
13 class BrowserView; | 13 class BrowserView; |
14 | 14 |
15 namespace views { | 15 namespace views { |
16 class NativeWidget; | 16 class NativeWidget; |
17 } | 17 } |
18 | 18 |
19 class NativeBrowserFrame { | 19 class NativeBrowserFrame { |
20 public: | 20 public: |
21 virtual ~NativeBrowserFrame() {} | 21 virtual ~NativeBrowserFrame() {} |
22 | 22 |
23 // Returns the platform specific InitParams for initializing our widget. | 23 // Returns the platform specific InitParams for initializing our widget. |
24 virtual views::Widget::InitParams GetWidgetParams() = 0; | 24 virtual views::Widget::InitParams GetWidgetParams() = 0; |
25 | 25 |
| 26 // Returns |true| if we should use the custom frame. |
| 27 virtual bool UseCustomFrame() const = 0; |
| 28 |
26 // Returns true if the OS takes care of showing the system menu. Returning | 29 // Returns true if the OS takes care of showing the system menu. Returning |
27 // false means BrowserFrame handles showing the system menu. | 30 // false means BrowserFrame handles showing the system menu. |
28 virtual bool UsesNativeSystemMenu() const = 0; | 31 virtual bool UsesNativeSystemMenu() const = 0; |
29 | 32 |
30 // Returns true when the window placement should be stored. | 33 // Returns true when the window placement should be stored. |
31 virtual bool ShouldSaveWindowPlacement() const = 0; | 34 virtual bool ShouldSaveWindowPlacement() const = 0; |
32 | 35 |
33 // Retrieves the window placement (show state and bounds) for restoring. | 36 // Retrieves the window placement (show state and bounds) for restoring. |
34 virtual void GetWindowPlacement(gfx::Rect* bounds, | 37 virtual void GetWindowPlacement(gfx::Rect* bounds, |
35 ui::WindowShowState* show_state) const = 0; | 38 ui::WindowShowState* show_state) const = 0; |
36 | 39 |
37 protected: | 40 protected: |
38 friend class BrowserFrame; | 41 friend class BrowserFrame; |
39 | 42 |
40 // BrowserFrame pass-thrus --------------------------------------------------- | 43 // BrowserFrame pass-thrus --------------------------------------------------- |
41 // See browser_frame.h for documentation: | 44 // See browser_frame.h for documentation: |
42 virtual int GetMinimizeButtonOffset() const = 0; | 45 virtual int GetMinimizeButtonOffset() const = 0; |
43 }; | 46 }; |
44 | 47 |
45 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ | 48 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ |
OLD | NEW |