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