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 #include "chrome/browser/ui/panels/panel_manager.h" | 5 #include "chrome/browser/ui/panels/panel_manager.h" |
6 | 6 |
7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
63 } | 63 } |
64 | 64 |
65 PanelManager::PanelManager() | 65 PanelManager::PanelManager() |
66 : panel_mouse_watcher_(PanelMouseWatcher::Create()), | 66 : panel_mouse_watcher_(PanelMouseWatcher::Create()), |
67 auto_sizing_enabled_(true), | 67 auto_sizing_enabled_(true), |
68 is_full_screen_(false), | 68 is_full_screen_(false), |
69 is_processing_overflow_(false) { | 69 is_processing_overflow_(false) { |
70 detached_strip_.reset(new DetachedPanelStrip(this)); | 70 detached_strip_.reset(new DetachedPanelStrip(this)); |
71 docked_strip_.reset(new DockedPanelStrip(this)); | 71 docked_strip_.reset(new DockedPanelStrip(this)); |
72 overflow_strip_.reset(new OverflowPanelStrip(this)); | 72 overflow_strip_.reset(new OverflowPanelStrip(this)); |
73 drag_controller_.reset(new PanelDragController()); | 73 drag_controller_.reset(new PanelDragController(this)); |
74 auto_hiding_desktop_bar_ = AutoHidingDesktopBar::Create(this); | 74 auto_hiding_desktop_bar_ = AutoHidingDesktopBar::Create(this); |
75 OnDisplayChanged(); | 75 OnDisplayChanged(); |
76 } | 76 } |
77 | 77 |
78 PanelManager::~PanelManager() { | 78 PanelManager::~PanelManager() { |
79 } | 79 } |
80 | 80 |
81 void PanelManager::OnDisplayChanged() { | 81 void PanelManager::OnDisplayChanged() { |
82 #if defined(OS_MACOSX) | 82 #if defined(OS_MACOSX) |
83 // On OSX, panels should be dropped all the way to the bottom edge of the | 83 // On OSX, panels should be dropped all the way to the bottom edge of the |
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
323 return panels; | 323 return panels; |
324 } | 324 } |
325 | 325 |
326 int PanelManager::overflow_strip_width() const { | 326 int PanelManager::overflow_strip_width() const { |
327 return kOverflowStripThickness; | 327 return kOverflowStripThickness; |
328 } | 328 } |
329 | 329 |
330 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { | 330 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { |
331 panel_mouse_watcher_.reset(watcher); | 331 panel_mouse_watcher_.reset(watcher); |
332 } | 332 } |
OLD | NEW |