| 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 class BrowserFrame; | 8 class BrowserFrame; |
| 9 class BrowserView; | 9 class BrowserView; |
| 10 | 10 |
| 11 namespace views { | 11 namespace views { |
| 12 class NativeWidget; | 12 class NativeWidget; |
| 13 } | 13 } |
| 14 | 14 |
| 15 class NativeBrowserFrame { | 15 class NativeBrowserFrame { |
| 16 public: | 16 public: |
| 17 virtual ~NativeBrowserFrame() {} | 17 virtual ~NativeBrowserFrame() {} |
| 18 | 18 |
| 19 // Construct a platform-specific implementation of this interface. | |
| 20 static NativeBrowserFrame* CreateNativeBrowserFrame( | |
| 21 BrowserFrame* browser_frame, | |
| 22 BrowserView* browser_view); | |
| 23 | |
| 24 virtual views::NativeWidget* AsNativeWidget() = 0; | 19 virtual views::NativeWidget* AsNativeWidget() = 0; |
| 25 virtual const views::NativeWidget* AsNativeWidget() const = 0; | 20 virtual const views::NativeWidget* AsNativeWidget() const = 0; |
| 26 | 21 |
| 27 // Returns true if the OS takes care of showing the system menu. Returning | 22 // Returns true if the OS takes care of showing the system menu. Returning |
| 28 // false means BrowserFrame handles showing the system menu. | 23 // false means BrowserFrame handles showing the system menu. |
| 29 virtual bool UsesNativeSystemMenu() const = 0; | 24 virtual bool UsesNativeSystemMenu() const = 0; |
| 30 | 25 |
| 31 protected: | 26 protected: |
| 32 friend class BrowserFrame; | 27 friend class BrowserFrame; |
| 33 | 28 |
| 34 // BrowserFrame pass-thrus --------------------------------------------------- | 29 // BrowserFrame pass-thrus --------------------------------------------------- |
| 35 // See browser_frame.h for documentation: | 30 // See browser_frame.h for documentation: |
| 36 virtual int GetMinimizeButtonOffset() const = 0; | 31 virtual int GetMinimizeButtonOffset() const = 0; |
| 37 // TODO(beng): replace with some kind of "framechanged" signal to Window. | 32 // TODO(beng): replace with some kind of "framechanged" signal to Window. |
| 38 virtual void TabStripDisplayModeChanged() = 0; | 33 virtual void TabStripDisplayModeChanged() = 0; |
| 39 }; | 34 }; |
| 40 | 35 |
| 41 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ | 36 #endif // CHROME_BROWSER_UI_VIEWS_FRAME_NATIVE_BROWSER_FRAME_H_ |
| OLD | NEW |