| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 bool ComputeBoundsForNextPanel(gfx::Rect* bounds, bool allow_size_change); | 77 bool ComputeBoundsForNextPanel(gfx::Rect* bounds, bool allow_size_change); |
| 78 | 78 |
| 79 // Finds one panel to close so that we may have space for the new panel | 79 // Finds one panel to close so that we may have space for the new panel |
| 80 // created by |extension|. | 80 // created by |extension|. |
| 81 void FindAndClosePanelOnOverflow(const Extension* extension); | 81 void FindAndClosePanelOnOverflow(const Extension* extension); |
| 82 | 82 |
| 83 // Help functions to drag the given panel. | 83 // Help functions to drag the given panel. |
| 84 void DragLeft(); | 84 void DragLeft(); |
| 85 void DragRight(); | 85 void DragRight(); |
| 86 | 86 |
| 87 // Horizontal spacing between panels. Used for unit testing. |
| 88 static int horizontal_spacing(); |
| 89 |
| 87 Panels panels_; | 90 Panels panels_; |
| 88 | 91 |
| 89 // Stores the panels that are pending to remove. We want to delay the removal | 92 // Stores the panels that are pending to remove. We want to delay the removal |
| 90 // when we're in the process of the dragging. | 93 // when we're in the process of the dragging. |
| 91 Panels panels_pending_to_remove_; | 94 Panels panels_pending_to_remove_; |
| 92 | 95 |
| 93 // Current work area used in computing the panel bounds. | 96 // Current work area used in computing the panel bounds. |
| 94 gfx::Rect work_area_; | 97 gfx::Rect work_area_; |
| 95 | 98 |
| 96 // Used in computing the bounds of the next panel. | 99 // Used in computing the bounds of the next panel. |
| (...skipping 12 matching lines...) Expand all Loading... |
| 109 | 112 |
| 110 // Bounds of the panel to drag. It is first set to the original bounds when | 113 // Bounds of the panel to drag. It is first set to the original bounds when |
| 111 // the dragging happens. Then it is updated to the position that will be set | 114 // the dragging happens. Then it is updated to the position that will be set |
| 112 // to when the dragging ends. | 115 // to when the dragging ends. |
| 113 gfx::Rect dragging_panel_bounds_; | 116 gfx::Rect dragging_panel_bounds_; |
| 114 | 117 |
| 115 DISALLOW_COPY_AND_ASSIGN(PanelManager); | 118 DISALLOW_COPY_AND_ASSIGN(PanelManager); |
| 116 }; | 119 }; |
| 117 | 120 |
| 118 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ | 121 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
| OLD | NEW |