Chromium Code Reviews| 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 "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" |
| 11 | 11 |
| 12 class NativePanelTesting; | 12 class NativePanelTesting; |
| 13 class Panel; | 13 class Panel; |
|
jianli
2011/08/01 18:52:13
Can you remove this since you're in this file?
jennb
2011/08/08 17:26:02
Done.
| |
| 14 | 14 |
| 15 namespace gfx { | 15 namespace gfx { |
| 16 class Rect; | 16 class Rect; |
| 17 } // namespace gfx | 17 } // namespace gfx |
| 18 | 18 |
| 19 // An interface for a class that implements platform-specific behavior for panel | 19 // An interface for a class that implements platform-specific behavior for panel |
| 20 // windows. We use this interface for two reasons: | 20 // windows. We use this interface for two reasons: |
| 21 // 1. We don't want to use BrowserWindow as the interface between shared panel | 21 // 1. We don't want to use BrowserWindow as the interface between shared panel |
| 22 // code and platform-specific code. BrowserWindow has a lot of methods, most | 22 // code and platform-specific code. BrowserWindow has a lot of methods, most |
| 23 // of which we don't use and simply stub out with NOTIMPLEMENTED(). | 23 // of which we don't use and simply stub out with NOTIMPLEMENTED(). |
| (...skipping 25 matching lines...) Expand all Loading... | |
| 49 // shown as 3-pixel lines. | 49 // shown as 3-pixel lines. |
| 50 virtual bool ShouldBringUpPanelTitleBar(int mouse_x, int mouse_y) const = 0; | 50 virtual bool ShouldBringUpPanelTitleBar(int mouse_x, int mouse_y) const = 0; |
| 51 | 51 |
| 52 virtual void ClosePanel() = 0; | 52 virtual void ClosePanel() = 0; |
| 53 virtual void ActivatePanel() = 0; | 53 virtual void ActivatePanel() = 0; |
| 54 virtual void DeactivatePanel() = 0; | 54 virtual void DeactivatePanel() = 0; |
| 55 virtual bool IsPanelActive() const = 0; | 55 virtual bool IsPanelActive() const = 0; |
| 56 virtual gfx::NativeWindow GetNativePanelHandle() = 0; | 56 virtual gfx::NativeWindow GetNativePanelHandle() = 0; |
| 57 virtual void UpdatePanelTitleBar() = 0; | 57 virtual void UpdatePanelTitleBar() = 0; |
| 58 virtual void ShowTaskManagerForPanel() = 0; | 58 virtual void ShowTaskManagerForPanel() = 0; |
| 59 virtual FindBar* CreatePanelFindBar() = 0; | |
|
jianli
2011/08/01 18:52:13
Better to add forward declaration for FindBar thou
jennb
2011/08/08 17:26:02
Done.
| |
| 59 virtual void NotifyPanelOnUserChangedTheme() = 0; | 60 virtual void NotifyPanelOnUserChangedTheme() = 0; |
| 60 virtual void DrawAttention() = 0; | 61 virtual void DrawAttention() = 0; |
| 61 virtual bool IsDrawingAttention() const = 0; | 62 virtual bool IsDrawingAttention() const = 0; |
| 62 virtual Browser* GetPanelBrowser() const = 0; | 63 virtual Browser* GetPanelBrowser() const = 0; |
| 63 virtual void DestroyPanelBrowser() = 0; | 64 virtual void DestroyPanelBrowser() = 0; |
| 64 | 65 |
| 65 // Returns a pointer to the testing interface to the native panel. | 66 // Returns a pointer to the testing interface to the native panel. |
| 66 virtual NativePanelTesting* GetNativePanelTesting() = 0; | 67 virtual NativePanelTesting* GetNativePanelTesting() = 0; |
| 67 }; | 68 }; |
| 68 | 69 |
| 69 // A NativePanel utility interface used for accessing elements of the | 70 // A NativePanel utility interface used for accessing elements of the |
| 70 // native panel used only by test automation. | 71 // native panel used only by test automation. |
| 71 class NativePanelTesting { | 72 class NativePanelTesting { |
| 72 public: | 73 public: |
| 73 | 74 |
| 74 protected: | 75 protected: |
| 75 virtual ~NativePanelTesting() {} | 76 virtual ~NativePanelTesting() {} |
| 76 }; | 77 }; |
| 77 | 78 |
| 78 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ | 79 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ |
| OLD | NEW |