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/rect.h" | 9 #include "ui/gfx/rect.h" |
10 #include "ui/views/widget/widget.h" | |
11 | 10 |
12 class BrowserFrame; | 11 class BrowserFrame; |
13 class BrowserView; | 12 class BrowserView; |
14 | 13 |
15 namespace views { | 14 namespace views { |
16 class NativeWidget; | 15 class NativeWidget; |
17 } | 16 } |
18 | 17 |
19 class NativeBrowserFrame { | 18 class NativeBrowserFrame { |
20 public: | 19 public: |
21 virtual ~NativeBrowserFrame() {} | 20 virtual ~NativeBrowserFrame() {} |
22 | 21 |
23 // Returns the platform specific InitParams for initializing our widget. | 22 virtual views::NativeWidget* AsNativeWidget() = 0; |
24 virtual views::Widget::InitParams GetWidgetParams() = 0; | 23 virtual const views::NativeWidget* AsNativeWidget() const = 0; |
25 | 24 |
26 // Returns true if the OS takes care of showing the system menu. Returning | 25 // Returns true if the OS takes care of showing the system menu. Returning |
27 // false means BrowserFrame handles showing the system menu. | 26 // false means BrowserFrame handles showing the system menu. |
28 virtual bool UsesNativeSystemMenu() const = 0; | 27 virtual bool UsesNativeSystemMenu() const = 0; |
29 | 28 |
30 // Returns true when the window placement should be stored. | 29 // Returns true when the window placement should be stored. |
31 virtual bool ShouldSaveWindowPlacement() const = 0; | 30 virtual bool ShouldSaveWindowPlacement() const = 0; |
32 | 31 |
33 // Retrieves the window placement (show state and bounds) for restoring. | 32 // Retrieves the window placement (show state and bounds) for restoring. |
34 virtual void GetWindowPlacement(gfx::Rect* bounds, | 33 virtual void GetWindowPlacement(gfx::Rect* bounds, |
35 ui::WindowShowState* show_state) const = 0; | 34 ui::WindowShowState* show_state) const = 0; |
36 | 35 |
37 protected: | 36 protected: |
38 friend class BrowserFrame; | 37 friend class BrowserFrame; |
39 | 38 |
40 // BrowserFrame pass-thrus --------------------------------------------------- | 39 // BrowserFrame pass-thrus --------------------------------------------------- |
41 // See browser_frame.h for documentation: | 40 // See browser_frame.h for documentation: |
42 virtual int GetMinimizeButtonOffset() const = 0; | 41 virtual int GetMinimizeButtonOffset() const = 0; |
43 }; | 42 }; |
44 | 43 |
45 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ | 44 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ |
OLD | NEW |