| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 "ui/gfx/native_widget_types.h" |
| 10 |
| 11 class Panel; |
| 12 |
| 9 namespace gfx { | 13 namespace gfx { |
| 10 class Rect; | 14 class Rect; |
| 11 } // namespace gfx | 15 } // namespace gfx |
| 12 | 16 |
| 13 // An interface for a class that implements platform-specific behavior for panel | 17 // An interface for a class that implements platform-specific behavior for panel |
| 14 // windows. We use this interface for two reasons: | 18 // windows. We use this interface for two reasons: |
| 15 // 1. We don't want to use BrowserWindow as the interface between shared panel | 19 // 1. We don't want to use BrowserWindow as the interface between shared panel |
| 16 // code and platform-specific code. BrowserWindow has a lot of methods, most | 20 // code and platform-specific code. BrowserWindow has a lot of methods, most |
| 17 // of which we don't use and simply stub out with NOTIMPLEMENTED(). | 21 // of which we don't use and simply stub out with NOTIMPLEMENTED(). |
| 18 // 2. We need some additional methods that BrowserWindow doesn't provide, such | 22 // 2. We need some additional methods that BrowserWindow doesn't provide, such |
| 19 // as MinimizePanel() and RestorePanel(). | 23 // as MinimizePanel() and RestorePanel(). |
| 20 // Note that even though we don't use BrowserWindow directly, Windows and GTK+ | 24 // Note that even though we don't use BrowserWindow directly, Windows and GTK+ |
| 21 // still use the BrowserWindow interface as part of their implementation so we | 25 // still use the BrowserWindow interface as part of their implementation so we |
| 22 // use Panel in all the method names to avoid collisions. | 26 // use Panel in all the method names to avoid collisions. |
| 23 class NativePanel { | 27 class NativePanel { |
| 24 public: | 28 friend class Panel; |
| 29 |
| 30 protected: |
| 31 virtual ~NativePanel() {} |
| 32 |
| 25 virtual void ShowPanel() = 0; | 33 virtual void ShowPanel() = 0; |
| 26 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0; | 34 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0; |
| 27 virtual void MinimizePanel() = 0; | 35 virtual void MinimizePanel() = 0; |
| 28 virtual void RestorePanel() = 0; | 36 virtual void RestorePanel() = 0; |
| 29 virtual void ClosePanel() = 0; | 37 virtual void ClosePanel() = 0; |
| 30 virtual void ActivatePanel() = 0; | 38 virtual void ActivatePanel() = 0; |
| 31 virtual void DeactivePanel() = 0; | 39 virtual void DeactivatePanel() = 0; |
| 32 virtual bool IsActivePanel() const = 0; | 40 virtual bool IsPanelActive() const = 0; |
| 41 virtual gfx::NativeWindow GetNativePanelHandle() = 0; |
| 42 virtual void UpdatePanelTitleBar() = 0; |
| 43 virtual void ShowTaskManagerForPanel() = 0; |
| 44 virtual void NotifyPanelOnUserChangedTheme() = 0; |
| 33 virtual void FlashPanelFrame() = 0; | 45 virtual void FlashPanelFrame() = 0; |
| 34 | 46 virtual void DestroyPanelBrowser() = 0; |
| 35 protected: | |
| 36 virtual ~NativePanel() {} | |
| 37 }; | 47 }; |
| 38 | 48 |
| 39 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ | 49 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ |
| OLD | NEW |