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_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 | 7 |
8 #include <list> | 8 #include <list> |
| 9 #include <memory> |
9 #include <vector> | 10 #include <vector> |
10 | 11 |
11 #include "base/lazy_instance.h" | 12 #include "base/lazy_instance.h" |
12 #include "base/macros.h" | 13 #include "base/macros.h" |
13 #include "base/memory/scoped_ptr.h" | |
14 #include "chrome/browser/ui/panels/display_settings_provider.h" | 14 #include "chrome/browser/ui/panels/display_settings_provider.h" |
15 #include "chrome/browser/ui/panels/panel.h" | 15 #include "chrome/browser/ui/panels/panel.h" |
16 #include "chrome/browser/ui/panels/panel_collection.h" | 16 #include "chrome/browser/ui/panels/panel_collection.h" |
17 #include "chrome/browser/ui/panels/panel_constants.h" | 17 #include "chrome/browser/ui/panels/panel_constants.h" |
18 #include "ui/gfx/geometry/rect.h" | 18 #include "ui/gfx/geometry/rect.h" |
19 | 19 |
20 class DetachedPanelCollection; | 20 class DetachedPanelCollection; |
21 class DockedPanelCollection; | 21 class DockedPanelCollection; |
22 class GURL; | 22 class GURL; |
23 class PanelDragController; | 23 class PanelDragController; |
(...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
219 const gfx::Rect& bounds, | 219 const gfx::Rect& bounds, |
220 CreateMode mode, | 220 CreateMode mode, |
221 PanelCollection::PositioningMask* positioning_mask); | 221 PanelCollection::PositioningMask* positioning_mask); |
222 | 222 |
223 // Tests may want to use a mock panel mouse watcher. | 223 // Tests may want to use a mock panel mouse watcher. |
224 void SetMouseWatcher(PanelMouseWatcher* watcher); | 224 void SetMouseWatcher(PanelMouseWatcher* watcher); |
225 | 225 |
226 // Tests may want to shorten time intervals to reduce running time. | 226 // Tests may want to shorten time intervals to reduce running time. |
227 static bool shorten_time_intervals_; | 227 static bool shorten_time_intervals_; |
228 | 228 |
229 scoped_ptr<DetachedPanelCollection> detached_collection_; | 229 std::unique_ptr<DetachedPanelCollection> detached_collection_; |
230 scoped_ptr<DockedPanelCollection> docked_collection_; | 230 std::unique_ptr<DockedPanelCollection> docked_collection_; |
231 Stacks stacks_; | 231 Stacks stacks_; |
232 | 232 |
233 scoped_ptr<PanelDragController> drag_controller_; | 233 std::unique_ptr<PanelDragController> drag_controller_; |
234 scoped_ptr<PanelResizeController> resize_controller_; | 234 std::unique_ptr<PanelResizeController> resize_controller_; |
235 | 235 |
236 // Use a mouse watcher to know when to bring up titlebars to "peek" at | 236 // Use a mouse watcher to know when to bring up titlebars to "peek" at |
237 // minimized panels. Mouse movement is only tracked when there is a minimized | 237 // minimized panels. Mouse movement is only tracked when there is a minimized |
238 // panel. | 238 // panel. |
239 scoped_ptr<PanelMouseWatcher> panel_mouse_watcher_; | 239 std::unique_ptr<PanelMouseWatcher> panel_mouse_watcher_; |
240 | 240 |
241 scoped_ptr<DisplaySettingsProvider> display_settings_provider_; | 241 std::unique_ptr<DisplaySettingsProvider> display_settings_provider_; |
242 | 242 |
243 // Whether or not bounds will be updated when the preferred content size is | 243 // Whether or not bounds will be updated when the preferred content size is |
244 // changed. The testing code could set this flag to false so that other tests | 244 // changed. The testing code could set this flag to false so that other tests |
245 // will not be affected. | 245 // will not be affected. |
246 bool auto_sizing_enabled_; | 246 bool auto_sizing_enabled_; |
247 | 247 |
248 DISALLOW_COPY_AND_ASSIGN(PanelManager); | 248 DISALLOW_COPY_AND_ASSIGN(PanelManager); |
249 }; | 249 }; |
250 | 250 |
251 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ | 251 #endif // CHROME_BROWSER_UI_PANELS_PANEL_MANAGER_H_ |
OLD | NEW |