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/logging.h" | 9 #include "base/logging.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 349 |
350 void PanelManager::RemoveAll() { | 350 void PanelManager::RemoveAll() { |
351 // This should not be called when we're in the process of dragging. | 351 // This should not be called when we're in the process of dragging. |
352 DCHECK(dragging_panel_index_ == kInvalidPanelIndex); | 352 DCHECK(dragging_panel_index_ == kInvalidPanelIndex); |
353 | 353 |
354 // Start from the bottom to avoid reshuffling. | 354 // Start from the bottom to avoid reshuffling. |
355 for (Panels::reverse_iterator iter = panels_.rbegin(); | 355 for (Panels::reverse_iterator iter = panels_.rbegin(); |
356 iter != panels_.rend(); ++iter) | 356 iter != panels_.rend(); ++iter) |
357 (*iter)->Close(); | 357 (*iter)->Close(); |
358 } | 358 } |
| 359 |
| 360 bool PanelManager::is_dragging_panel() const { |
| 361 return dragging_panel_index_ != kInvalidPanelIndex; |
| 362 } |
OLD | NEW |