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 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 int GetBottomPositionForExpansionState( | 68 int GetBottomPositionForExpansionState( |
69 Panel::ExpansionState expansion_state) const; | 69 Panel::ExpansionState expansion_state) const; |
70 | 70 |
71 // Returns the next browser window which could be either panel window or | 71 // Returns the next browser window which could be either panel window or |
72 // tabbed window, to switch to if the given panel is going to be deactivated. | 72 // tabbed window, to switch to if the given panel is going to be deactivated. |
73 // Returns NULL if such window cannot be found. | 73 // Returns NULL if such window cannot be found. |
74 BrowserWindow* GetNextBrowserWindowToActivate(Panel* panel) const; | 74 BrowserWindow* GetNextBrowserWindowToActivate(Panel* panel) const; |
75 | 75 |
76 int num_panels() const { return panels_.size(); } | 76 int num_panels() const { return panels_.size(); } |
77 bool is_dragging_panel() const; | 77 bool is_dragging_panel() const; |
| 78 const Panels& panels() const { return panels_; } |
78 | 79 |
79 int GetMaxPanelWidth() const; | 80 int GetMaxPanelWidth() const; |
80 int GetMaxPanelHeight() const; | 81 int GetMaxPanelHeight() const; |
81 int StartingRightPosition() const; | 82 int StartingRightPosition() const; |
82 | 83 |
83 // Overridden from PanelMouseWatcher::Observer: | 84 // Overridden from PanelMouseWatcher::Observer: |
84 virtual void OnMouseMove(const gfx::Point& mouse_position) OVERRIDE; | 85 virtual void OnMouseMove(const gfx::Point& mouse_position) OVERRIDE; |
85 | 86 |
86 #ifdef UNIT_TEST | 87 #ifdef UNIT_TEST |
87 const Panels& panels() const { return panels_; } | |
88 static int horizontal_spacing() { return kPanelsHorizontalSpacing; } | 88 static int horizontal_spacing() { return kPanelsHorizontalSpacing; } |
89 | 89 |
90 const gfx::Rect& work_area() const { | 90 const gfx::Rect& work_area() const { |
91 return work_area_; | 91 return work_area_; |
92 } | 92 } |
93 | 93 |
94 void set_auto_hiding_desktop_bar( | 94 void set_auto_hiding_desktop_bar( |
95 AutoHidingDesktopBar* auto_hiding_desktop_bar) { | 95 AutoHidingDesktopBar* auto_hiding_desktop_bar) { |
96 auto_hiding_desktop_bar_ = auto_hiding_desktop_bar; | 96 auto_hiding_desktop_bar_ = auto_hiding_desktop_bar; |
97 } | 97 } |
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
228 static const int kPanelMinHeight = 100; | 228 static const int kPanelMinHeight = 100; |
229 | 229 |
230 DISALLOW_COPY_AND_ASSIGN(PanelManager); | 230 DISALLOW_COPY_AND_ASSIGN(PanelManager); |
231 }; | 231 }; |
232 | 232 |
233 // Required for CancellableTask to be used with non-refcounted objects. | 233 // Required for CancellableTask to be used with non-refcounted objects. |
234 // Defines empty AddRef/Release. | 234 // Defines empty AddRef/Release. |
235 DISABLE_RUNNABLE_METHOD_REFCOUNT(PanelManager); | 235 DISABLE_RUNNABLE_METHOD_REFCOUNT(PanelManager); |
236 | 236 |
237 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ | 237 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
OLD | NEW |