| 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 22 matching lines...) Expand all Loading... |
| 33 virtual ~NativePanel() {} | 33 virtual ~NativePanel() {} |
| 34 | 34 |
| 35 virtual void ShowPanel() = 0; | 35 virtual void ShowPanel() = 0; |
| 36 virtual void ShowPanelInactive() = 0; | 36 virtual void ShowPanelInactive() = 0; |
| 37 virtual gfx::Rect GetPanelBounds() const = 0; | 37 virtual gfx::Rect GetPanelBounds() const = 0; |
| 38 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0; | 38 virtual void SetPanelBounds(const gfx::Rect& bounds) = 0; |
| 39 | 39 |
| 40 // The native panel needs to update the bounds. In addition, it needs to watch | 40 // The native panel needs to update the bounds. In addition, it needs to watch |
| 41 // for the mouse movement so that it knows when to bring up or down all the | 41 // for the mouse movement so that it knows when to bring up or down all the |
| 42 // minimized panels. To do this, when the mouse moves, the native panel needs | 42 // minimized panels. To do this, when the mouse moves, the native panel needs |
| 43 // to call PanelManager::ShouldBringUpTitleBarForAllMinimizedPanels to check. | 43 // to call PanelManager::ShouldBringUpTitlebarForAllMinimizedPanels to check. |
| 44 virtual void OnPanelExpansionStateChanged( | 44 virtual void OnPanelExpansionStateChanged( |
| 45 Panel::ExpansionState expansion_state) = 0; | 45 Panel::ExpansionState expansion_state) = 0; |
| 46 | 46 |
| 47 // When the mouse is at (mouse_x, mouse_y) in screen coordinate system, finds | 47 // When the mouse is at (mouse_x, mouse_y) in screen coordinate system, finds |
| 48 // out if the title-bar needs to pop up for the minimized panel that is only | 48 // out if the title-bar needs to pop up for the minimized panel that is only |
| 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; | 59 virtual FindBar* CreatePanelFindBar() = 0; |
| 60 virtual void NotifyPanelOnUserChangedTheme() = 0; | 60 virtual void NotifyPanelOnUserChangedTheme() = 0; |
| (...skipping 13 matching lines...) Expand all Loading... |
| 74 virtual ~NativePanelTesting() {} | 74 virtual ~NativePanelTesting() {} |
| 75 | 75 |
| 76 virtual void PressLeftMouseButtonTitlebar(const gfx::Point& point) = 0; | 76 virtual void PressLeftMouseButtonTitlebar(const gfx::Point& point) = 0; |
| 77 virtual void ReleaseMouseButtonTitlebar() = 0; | 77 virtual void ReleaseMouseButtonTitlebar() = 0; |
| 78 virtual void DragTitlebar(int delta_x, int delta_y) = 0; | 78 virtual void DragTitlebar(int delta_x, int delta_y) = 0; |
| 79 virtual void CancelDragTitlebar() = 0; | 79 virtual void CancelDragTitlebar() = 0; |
| 80 virtual void FinishDragTitlebar() = 0; | 80 virtual void FinishDragTitlebar() = 0; |
| 81 }; | 81 }; |
| 82 | 82 |
| 83 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ | 83 #endif // CHROME_BROWSER_UI_PANELS_NATIVE_PANEL_H_ |
| OLD | NEW |