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" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 63 virtual void DestroyPanelBrowser() = 0; | 63 virtual void DestroyPanelBrowser() = 0; |
| 64 | 64 |
| 65 // Returns the exterior size of the panel window given the client content | 65 // Returns the exterior size of the panel window given the client content |
| 66 // size and vice versa. | 66 // size and vice versa. |
| 67 virtual gfx::Size WindowSizeFromContentSize( | 67 virtual gfx::Size WindowSizeFromContentSize( |
| 68 const gfx::Size& content_size) const = 0; | 68 const gfx::Size& content_size) const = 0; |
| 69 virtual gfx::Size ContentSizeFromWindowSize( | 69 virtual gfx::Size ContentSizeFromWindowSize( |
| 70 const gfx::Size& window_size) const = 0; | 70 const gfx::Size& window_size) const = 0; |
| 71 | 71 |
| 72 virtual int TitleOnlyHeight() const = 0; | 72 virtual int TitleOnlyHeight() const = 0; |
| 73 | |
| 74 // Returns the size of the iconified panel. This is the size we use to draw | |
| 75 // the panel put in the overflow area. | |
| 76 virtual gfx::Size GetIconifiedPanelSize() const = 0; | |
|
jennb
2011/12/01 18:45:25
Agree with prasadt that on confusion as to what an
| |
| 77 | |
| 78 // Brings the panel to the top of the z-order without activating it. This | |
| 79 // will make sure that the panel is not obscured by other top-most windows. | |
| 80 virtual void EnsurePanelFullyVisible() = 0; | |
|
jennb
2011/12/01 18:45:25
I don't care if you want to call this BringToTopWi
| |
| 73 }; | 81 }; |
| 74 | 82 |
| 75 // A NativePanel utility interface used for accessing elements of the | 83 // A NativePanel utility interface used for accessing elements of the |
| 76 // native panel used only by test automation. | 84 // native panel used only by test automation. |
| 77 class NativePanelTesting { | 85 class NativePanelTesting { |
| 78 public: | 86 public: |
| 79 static NativePanelTesting* Create(NativePanel* native_panel); | 87 static NativePanelTesting* Create(NativePanel* native_panel); |
| 80 virtual ~NativePanelTesting() {} | 88 virtual ~NativePanelTesting() {} |
| 81 | 89 |
| 82 virtual void PressLeftMouseButtonTitlebar(const gfx::Point& point) = 0; | 90 virtual void PressLeftMouseButtonTitlebar(const gfx::Point& point) = 0; |
| 83 virtual void ReleaseMouseButtonTitlebar() = 0; | 91 virtual void ReleaseMouseButtonTitlebar() = 0; |
| 84 virtual void DragTitlebar(int delta_x, int delta_y) = 0; | 92 virtual void DragTitlebar(int delta_x, int delta_y) = 0; |
| 85 virtual void CancelDragTitlebar() = 0; | 93 virtual void CancelDragTitlebar() = 0; |
| 86 virtual void FinishDragTitlebar() = 0; | 94 virtual void FinishDragTitlebar() = 0; |
| 87 | 95 |
| 88 // Verifies, on a deepest possible level, if the Panel is showing the "Draw | 96 // Verifies, on a deepest possible level, if the Panel is showing the "Draw |
| 89 // Attention" effects to the user. May include checking colors etc. | 97 // Attention" effects to the user. May include checking colors etc. |
| 90 virtual bool VerifyDrawingAttention() const = 0; | 98 virtual bool VerifyDrawingAttention() const = 0; |
| 91 // Verifies, on a deepest possible level, if the native panel is really | 99 // Verifies, on a deepest possible level, if the native panel is really |
| 92 // active, i.e. the titlebar is painted per its active state. | 100 // active, i.e. the titlebar is painted per its active state. |
| 93 virtual bool VerifyActiveState(bool is_active) = 0; | 101 virtual bool VerifyActiveState(bool is_active) = 0; |
| 94 virtual void WaitForWindowCreationToComplete() const { } | 102 virtual void WaitForWindowCreationToComplete() const { } |
| 95 | 103 |
| 96 virtual bool IsWindowSizeKnown() const = 0; | 104 virtual bool IsWindowSizeKnown() const = 0; |
| 97 virtual bool IsAnimatingBounds() const = 0; | 105 virtual bool IsAnimatingBounds() const = 0; |
| 98 }; | 106 }; |
| 99 | 107 |
| 100 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ | 108 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ |
| OLD | NEW |