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 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
60 virtual void NotifyPanelOnUserChangedTheme() = 0; | 60 virtual void NotifyPanelOnUserChangedTheme() = 0; |
61 virtual void DrawAttention() = 0; | 61 virtual void DrawAttention() = 0; |
62 virtual bool IsDrawingAttention() const = 0; | 62 virtual bool IsDrawingAttention() const = 0; |
63 virtual bool PreHandlePanelKeyboardEvent( | 63 virtual bool PreHandlePanelKeyboardEvent( |
64 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) = 0; | 64 const NativeWebKeyboardEvent& event, bool* is_keyboard_shortcut) = 0; |
65 virtual void HandlePanelKeyboardEvent( | 65 virtual void HandlePanelKeyboardEvent( |
66 const NativeWebKeyboardEvent& event) = 0; | 66 const NativeWebKeyboardEvent& event) = 0; |
67 | 67 |
68 virtual Browser* GetPanelBrowser() const = 0; | 68 virtual Browser* GetPanelBrowser() const = 0; |
69 virtual void DestroyPanelBrowser() = 0; | 69 virtual void DestroyPanelBrowser() = 0; |
| 70 |
| 71 // Returns the extent of the non-client area, that is, the window size minus |
| 72 // the size of the client area. |
| 73 virtual gfx::Size GetNonClientAreaExtent() const = 0; |
| 74 |
| 75 // Gets or sets the restored height, which is the full height of the panel |
| 76 // when it is expanded. |
| 77 virtual int GetRestoredHeight() const = 0; |
| 78 virtual void SetRestoredHeight(int height) = 0; |
70 }; | 79 }; |
71 | 80 |
72 // A NativePanel utility interface used for accessing elements of the | 81 // A NativePanel utility interface used for accessing elements of the |
73 // native panel used only by test automation. | 82 // native panel used only by test automation. |
74 class NativePanelTesting { | 83 class NativePanelTesting { |
75 public: | 84 public: |
76 static NativePanelTesting* Create(NativePanel* native_panel); | 85 static NativePanelTesting* Create(NativePanel* native_panel); |
77 | 86 |
78 // clang gives error on delete if the destructor is not virtual. | 87 // clang gives error on delete if the destructor is not virtual. |
79 virtual ~NativePanelTesting() {} | 88 virtual ~NativePanelTesting() {} |
80 | 89 |
81 virtual void PressLeftMouseButtonTitlebar(const gfx::Point& point) = 0; | 90 virtual void PressLeftMouseButtonTitlebar(const gfx::Point& point) = 0; |
82 virtual void ReleaseMouseButtonTitlebar() = 0; | 91 virtual void ReleaseMouseButtonTitlebar() = 0; |
83 virtual void DragTitlebar(int delta_x, int delta_y) = 0; | 92 virtual void DragTitlebar(int delta_x, int delta_y) = 0; |
84 virtual void CancelDragTitlebar() = 0; | 93 virtual void CancelDragTitlebar() = 0; |
85 virtual void FinishDragTitlebar() = 0; | 94 virtual void FinishDragTitlebar() = 0; |
86 }; | 95 }; |
87 | 96 |
88 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ | 97 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ |
OLD | NEW |