OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_PANEL_STRIP_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include "ui/gfx/rect.h" | 9 #include "ui/gfx/rect.h" |
10 | 10 |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 // draw attention state. | 55 // draw attention state. |
56 virtual void OnPanelAttentionStateChanged(Panel* panel) = 0; | 56 virtual void OnPanelAttentionStateChanged(Panel* panel) = 0; |
57 | 57 |
58 // Updates the display to show |panel| as active. | 58 // Updates the display to show |panel| as active. |
59 virtual void ActivatePanel(Panel* panel) = 0; | 59 virtual void ActivatePanel(Panel* panel) = 0; |
60 | 60 |
61 // Updates the display to show |panel| as minimized/restored. | 61 // Updates the display to show |panel| as minimized/restored. |
62 virtual void MinimizePanel(Panel* panel) = 0; | 62 virtual void MinimizePanel(Panel* panel) = 0; |
63 virtual void RestorePanel(Panel* panel) = 0; | 63 virtual void RestorePanel(Panel* panel) = 0; |
64 | 64 |
| 65 // Returns true if |panel| is draggable. |
| 66 virtual bool CanDragPanel(const Panel* panel) const = 0; |
| 67 |
| 68 // Drags |panel| in the bounds of this strip. |
| 69 virtual void StartDraggingPanel(Panel* panel) = 0; |
| 70 // |delta_x| and |delta_y| denotes how much the mouse has been moved since |
| 71 // last time when DragPanel or StartDraggingPanel is called. |
| 72 virtual void DragPanel(Panel* panel, int delta_x, int delta_y) = 0; |
| 73 virtual void EndDraggingPanel(Panel* panel, bool cancelled) = 0; |
| 74 |
65 protected: | 75 protected: |
66 explicit PanelStrip(Type type); | 76 explicit PanelStrip(Type type); |
67 virtual ~PanelStrip(); | 77 virtual ~PanelStrip(); |
68 | 78 |
69 const Type type_; // Type of this panel strip. | 79 const Type type_; // Type of this panel strip. |
70 }; | 80 }; |
71 | 81 |
72 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ | 82 #endif // CHROME_BROWSER_UI_PANELS_PANEL_STRIP_H_ |
OLD | NEW |