Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(774)

Unified Diff: chrome/browser/ui/panels/panel_manager.cc

Issue 7706027: Addition testing for panels drag and drop. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: For testing on windows Created 9 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_manager.cc
diff --git a/chrome/browser/ui/panels/panel_manager.cc b/chrome/browser/ui/panels/panel_manager.cc
index f19422f421e2794e6e22cb5f5dd5deae694629e0..4374a72a6d28446681d514bc24a44a55e60842a3 100644
--- a/chrome/browser/ui/panels/panel_manager.cc
+++ b/chrome/browser/ui/panels/panel_manager.cc
@@ -28,9 +28,6 @@ const int kPanelDefaultHeightPixels = 290;
const double kPanelMaxWidthFactor = 1.0;
const double kPanelMaxHeightFactor = 0.5;
-// Horizontal spacing between two panels.
-const int kPanelsHorizontalSpacing = 4;
-
// Single instance of PanelManager.
scoped_ptr<PanelManager> panel_instance;
} // namespace
@@ -351,9 +348,12 @@ void PanelManager::RemoveAll() {
// This should not be called when we're in the process of dragging.
DCHECK(dragging_panel_index_ == kInvalidPanelIndex);
+ // Make a copy of the iterator as closing panels can modify the vector.
+ Panels panels_copy = panels_;
+
// Start from the bottom to avoid reshuffling.
- for (Panels::reverse_iterator iter = panels_.rbegin();
- iter != panels_.rend(); ++iter)
+ for (Panels::reverse_iterator iter = panels_copy.rbegin();
+ iter != panels_copy.rend(); ++iter)
(*iter)->Close();
}
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698