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_PANELS_NATIVE_PANEL_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ |
6 #define CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ | 6 #define CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "chrome/browser/ui/panels/panel.h" | 9 #include "chrome/browser/ui/panels/panel.h" |
10 #include "ui/gfx/native_widget_types.h" | 10 #include "ui/gfx/native_widget_types.h" |
(...skipping 18 matching lines...) Expand all Loading... |
29 // of which we don't use and simply stub out with NOTIMPLEMENTED(). | 29 // of which we don't use and simply stub out with NOTIMPLEMENTED(). |
30 // 2. We need some additional methods that BrowserWindow doesn't provide, such | 30 // 2. We need some additional methods that BrowserWindow doesn't provide, such |
31 // as MinimizePanel() and RestorePanel(). | 31 // as MinimizePanel() and RestorePanel(). |
32 // Note that even though we don't use BrowserWindow directly, Windows and GTK+ | 32 // Note that even though we don't use BrowserWindow directly, Windows and GTK+ |
33 // still use the BrowserWindow interface as part of their implementation so we | 33 // still use the BrowserWindow interface as part of their implementation so we |
34 // use Panel in all the method names to avoid collisions. | 34 // use Panel in all the method names to avoid collisions. |
35 class NativePanel { | 35 class NativePanel { |
36 friend class Panel; | 36 friend class Panel; |
37 friend class PanelBrowserWindow; | 37 friend class PanelBrowserWindow; |
38 friend class PanelBrowserTest; | 38 friend class PanelBrowserTest; |
| 39 friend class OldPanelBrowserTest; |
39 | 40 |
40 protected: | 41 protected: |
41 virtual ~NativePanel() {} | 42 virtual ~NativePanel() {} |
42 | 43 |
43 virtual void ShowPanel() = 0; | 44 virtual void ShowPanel() = 0; |
44 virtual void ShowPanelInactive() = 0; | 45 virtual void ShowPanelInactive() = 0; |
45 virtual gfx::Rect GetPanelBounds() const = 0; | 46 virtual gfx::Rect GetPanelBounds() const = 0; |
46 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0; | 47 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0; |
47 virtual void SetPanelBoundsInstantly(const gfx::Rect& bounds) = 0; | 48 virtual void SetPanelBoundsInstantly(const gfx::Rect& bounds) = 0; |
48 virtual void ClosePanel() = 0; | 49 virtual void ClosePanel() = 0; |
(...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 // active, i.e. the titlebar is painted per its active state. | 128 // active, i.e. the titlebar is painted per its active state. |
128 virtual bool VerifyActiveState(bool is_active) = 0; | 129 virtual bool VerifyActiveState(bool is_active) = 0; |
129 virtual void WaitForWindowCreationToComplete() const { } | 130 virtual void WaitForWindowCreationToComplete() const { } |
130 | 131 |
131 virtual bool IsWindowSizeKnown() const = 0; | 132 virtual bool IsWindowSizeKnown() const = 0; |
132 virtual bool IsAnimatingBounds() const = 0; | 133 virtual bool IsAnimatingBounds() const = 0; |
133 virtual bool IsButtonVisible(panel::TitlebarButtonType button_type) const = 0; | 134 virtual bool IsButtonVisible(panel::TitlebarButtonType button_type) const = 0; |
134 }; | 135 }; |
135 | 136 |
136 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ | 137 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ |
OLD | NEW |