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/docked_panel_strip.h" | 5 #include "chrome/browser/ui/panels/docked_panel_strip.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
237 | 237 |
238 if (update_original_dragging_iterator_after_erase) | 238 if (update_original_dragging_iterator_after_erase) |
239 dragging_panel_original_iterator_ = iter; | 239 dragging_panel_original_iterator_ = iter; |
240 | 240 |
241 if (!disable_layout_refresh_) | 241 if (!disable_layout_refresh_) |
242 RefreshLayout(); | 242 RefreshLayout(); |
243 | 243 |
244 return true; | 244 return true; |
245 } | 245 } |
246 | 246 |
| 247 bool DockedPanelStrip::TreatAllPanelsAsMinimized() const { |
| 248 return false; |
| 249 } |
| 250 |
247 bool DockedPanelStrip::CanShowPanelAsActive(const Panel* panel) const { | 251 bool DockedPanelStrip::CanShowPanelAsActive(const Panel* panel) const { |
248 // Panels with temporary layout cannot be shown as active. | 252 // Panels with temporary layout cannot be shown as active. |
249 return !panel->has_temporary_layout(); | 253 return !panel->has_temporary_layout(); |
250 } | 254 } |
251 | 255 |
252 bool DockedPanelStrip::CanDragPanel(const Panel* panel) const { | 256 bool DockedPanelStrip::CanDragPanel(const Panel* panel) const { |
253 // Only the panels having temporary layout can't be dragged. | 257 // Only the panels having temporary layout can't be dragged. |
254 return !panel->has_temporary_layout(); | 258 return !panel->has_temporary_layout(); |
255 } | 259 } |
256 | 260 |
(...skipping 490 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 DCHECK(panels_in_temporary_layout_.empty()); | 751 DCHECK(panels_in_temporary_layout_.empty()); |
748 | 752 |
749 // Make a copy of the iterator as closing panels can modify the vector. | 753 // Make a copy of the iterator as closing panels can modify the vector. |
750 Panels panels_copy = panels_; | 754 Panels panels_copy = panels_; |
751 | 755 |
752 // Start from the bottom to avoid reshuffling. | 756 // Start from the bottom to avoid reshuffling. |
753 for (Panels::reverse_iterator iter = panels_copy.rbegin(); | 757 for (Panels::reverse_iterator iter = panels_copy.rbegin(); |
754 iter != panels_copy.rend(); ++iter) | 758 iter != panels_copy.rend(); ++iter) |
755 (*iter)->Close(); | 759 (*iter)->Close(); |
756 } | 760 } |
OLD | NEW |