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