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 <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
43 | 43 |
44 // See usage below. | 44 // See usage below. |
45 #if defined(TOOLKIT_GTK) | 45 #if defined(TOOLKIT_GTK) |
46 const int kMillisecondsBeforeCollapsingFromTitleOnlyState = 2000; | 46 const int kMillisecondsBeforeCollapsingFromTitleOnlyState = 2000; |
47 #else | 47 #else |
48 const int kMillisecondsBeforeCollapsingFromTitleOnlyState = 0; | 48 const int kMillisecondsBeforeCollapsingFromTitleOnlyState = 0; |
49 #endif | 49 #endif |
50 } // namespace | 50 } // namespace |
51 | 51 |
52 // static | 52 // static |
53 const int PanelManager::kPanelMinWidth; | |
jennb
2011/11/23 04:38:42
Are these needed?
Dmitry Titov
2011/11/23 18:47:49
Yes! Without these, linker often complains that it
| |
54 const int PanelManager::kPanelMinHeight; | |
55 | |
56 // static | |
53 PanelManager* PanelManager::GetInstance() { | 57 PanelManager* PanelManager::GetInstance() { |
54 static base::LazyInstance<PanelManager> instance = LAZY_INSTANCE_INITIALIZER; | 58 static base::LazyInstance<PanelManager> instance = LAZY_INSTANCE_INITIALIZER; |
55 return instance.Pointer(); | 59 return instance.Pointer(); |
56 } | 60 } |
57 | 61 |
58 PanelManager::PanelManager() | 62 PanelManager::PanelManager() |
59 : minimized_panel_count_(0), | 63 : minimized_panel_count_(0), |
60 are_titlebars_up_(false), | 64 are_titlebars_up_(false), |
61 dragging_panel_index_(kInvalidPanelIndex), | 65 dragging_panel_index_(kInvalidPanelIndex), |
62 dragging_panel_original_x_(0), | 66 dragging_panel_original_x_(0), |
(...skipping 565 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
628 | 632 |
629 // Start from the bottom to avoid reshuffling. | 633 // Start from the bottom to avoid reshuffling. |
630 for (Panels::reverse_iterator iter = panels_copy.rbegin(); | 634 for (Panels::reverse_iterator iter = panels_copy.rbegin(); |
631 iter != panels_copy.rend(); ++iter) | 635 iter != panels_copy.rend(); ++iter) |
632 (*iter)->Close(); | 636 (*iter)->Close(); |
633 } | 637 } |
634 | 638 |
635 bool PanelManager::is_dragging_panel() const { | 639 bool PanelManager::is_dragging_panel() const { |
636 return dragging_panel_index_ != kInvalidPanelIndex; | 640 return dragging_panel_index_ != kInvalidPanelIndex; |
637 } | 641 } |
OLD | NEW |