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 #include "chrome/browser/ui/panels/panel_manager.h" | 5 #include "chrome/browser/ui/panels/panel_manager.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "chrome/browser/fullscreen.h" | 9 #include "chrome/browser/fullscreen.h" |
10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 const int kPanelStripRightMargin = 24; | 25 const int kPanelStripRightMargin = 24; |
26 | 26 |
27 // Height of panel strip is based on the factor of the working area. | 27 // Height of panel strip is based on the factor of the working area. |
28 const double kPanelStripHeightFactor = 0.5; | 28 const double kPanelStripHeightFactor = 0.5; |
29 | 29 |
30 static const int kFullScreenModeCheckIntervalMs = 1000; | 30 static const int kFullScreenModeCheckIntervalMs = 1000; |
31 | 31 |
32 } // namespace | 32 } // namespace |
33 | 33 |
34 // static | 34 // static |
| 35 bool PanelManager::shorten_time_intervals_ = false; |
| 36 |
| 37 // static |
35 PanelManager* PanelManager::GetInstance() { | 38 PanelManager* PanelManager::GetInstance() { |
36 static base::LazyInstance<PanelManager> instance = LAZY_INSTANCE_INITIALIZER; | 39 static base::LazyInstance<PanelManager> instance = LAZY_INSTANCE_INITIALIZER; |
37 return instance.Pointer(); | 40 return instance.Pointer(); |
38 } | 41 } |
39 | 42 |
40 PanelManager::PanelManager() | 43 PanelManager::PanelManager() |
41 : panel_mouse_watcher_(PanelMouseWatcher::Create()), | 44 : panel_mouse_watcher_(PanelMouseWatcher::Create()), |
42 auto_sizing_enabled_(true), | 45 auto_sizing_enabled_(true), |
43 is_full_screen_(false) { | 46 is_full_screen_(false) { |
44 panel_strip_.reset(new PanelStrip(this)); | 47 panel_strip_.reset(new PanelStrip(this)); |
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 return panel_strip_->num_panels() + panel_overflow_strip_->num_panels(); | 233 return panel_strip_->num_panels() + panel_overflow_strip_->num_panels(); |
231 } | 234 } |
232 | 235 |
233 const PanelManager::Panels& PanelManager::panels() const { | 236 const PanelManager::Panels& PanelManager::panels() const { |
234 return panel_strip_->panels(); | 237 return panel_strip_->panels(); |
235 } | 238 } |
236 | 239 |
237 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { | 240 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { |
238 panel_mouse_watcher_.reset(watcher); | 241 panel_mouse_watcher_.reset(watcher); |
239 } | 242 } |
OLD | NEW |