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_PANEL_MANAGER_H_ | 5 #ifndef CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
6 #define CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ | 6 #define CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <vector> | 9 #include <vector> |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 21 matching lines...) Expand all Loading... |
32 | 32 |
33 void Remove(Panel* panel); | 33 void Remove(Panel* panel); |
34 void RemoveAll(); | 34 void RemoveAll(); |
35 | 35 |
36 // Drags the given panel. | 36 // Drags the given panel. |
37 void StartDragging(Panel* panel); | 37 void StartDragging(Panel* panel); |
38 void Drag(int delta_x); | 38 void Drag(int delta_x); |
39 void EndDragging(bool cancelled); | 39 void EndDragging(bool cancelled); |
40 | 40 |
41 // Should we bring up the titlebar, given the current mouse point? | 41 // Should we bring up the titlebar, given the current mouse point? |
42 bool ShouldBringUpTitleBarForAllMinimizedPanels(int mouse_x, | 42 bool ShouldBringUpTitlebarForAllMinimizedPanels(int mouse_x, |
43 int mouse_y) const; | 43 int mouse_y) const; |
44 | 44 |
45 // Brings up or down the title-bar for all minimized panels. | 45 // Brings up or down the title-bar for all minimized panels. |
46 void BringUpOrDownTitleBarForAllMinimizedPanels(bool bring_up); | 46 void BringUpOrDownTitlebarForAllMinimizedPanels(bool bring_up); |
47 | 47 |
48 int num_panels() const { return panels_.size(); } | 48 int num_panels() const { return panels_.size(); } |
49 | 49 |
50 private: | 50 private: |
51 friend class PanelBrowserTest; | 51 friend class PanelBrowserTest; |
52 | 52 |
53 typedef std::vector<Panel*> Panels; | 53 typedef std::vector<Panel*> Panels; |
54 | 54 |
55 PanelManager(); | 55 PanelManager(); |
56 | 56 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
108 | 108 |
109 // Bounds of the panel to drag. It is first set to the original bounds when | 109 // Bounds of the panel to drag. It is first set to the original bounds when |
110 // the dragging happens. Then it is updated to the position that will be set | 110 // the dragging happens. Then it is updated to the position that will be set |
111 // to when the dragging ends. | 111 // to when the dragging ends. |
112 gfx::Rect dragging_panel_bounds_; | 112 gfx::Rect dragging_panel_bounds_; |
113 | 113 |
114 DISALLOW_COPY_AND_ASSIGN(PanelManager); | 114 DISALLOW_COPY_AND_ASSIGN(PanelManager); |
115 }; | 115 }; |
116 | 116 |
117 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ | 117 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
OLD | NEW |