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

Side by Side Diff: chrome/browser/ui/panels/docked_panel_strip.cc

Issue 9593001: Revert 124790 - Minimized panels should not open on Windows when activated by the OS (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 years, 9 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chrome/browser/ui/panels/docked_panel_strip.h ('k') | chrome/browser/ui/panels/native_panel.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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::IsPanelMinimized(Panel* panel) const {
248 DCHECK_EQ(this, panel->panel_strip());
249 return panel->expansion_state() != Panel::EXPANDED;
250 }
251
252 bool DockedPanelStrip::CanShowPanelAsActive(const Panel* panel) const { 247 bool DockedPanelStrip::CanShowPanelAsActive(const Panel* panel) const {
253 // Panels with temporary layout cannot be shown as active. 248 // Panels with temporary layout cannot be shown as active.
254 return !panel->has_temporary_layout(); 249 return !panel->has_temporary_layout();
255 } 250 }
256 251
257 bool DockedPanelStrip::CanDragPanel(const Panel* panel) const { 252 bool DockedPanelStrip::CanDragPanel(const Panel* panel) const {
258 // Only the panels having temporary layout can't be dragged. 253 // Only the panels having temporary layout can't be dragged.
259 return !panel->has_temporary_layout(); 254 return !panel->has_temporary_layout();
260 } 255 }
261 256
(...skipping 491 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 DCHECK(panels_in_temporary_layout_.empty()); 748 DCHECK(panels_in_temporary_layout_.empty());
754 749
755 // Make a copy of the iterator as closing panels can modify the vector. 750 // Make a copy of the iterator as closing panels can modify the vector.
756 Panels panels_copy = panels_; 751 Panels panels_copy = panels_;
757 752
758 // Start from the bottom to avoid reshuffling. 753 // Start from the bottom to avoid reshuffling.
759 for (Panels::reverse_iterator iter = panels_copy.rbegin(); 754 for (Panels::reverse_iterator iter = panels_copy.rbegin();
760 iter != panels_copy.rend(); ++iter) 755 iter != panels_copy.rend(); ++iter)
761 (*iter)->Close(); 756 (*iter)->Close();
762 } 757 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/docked_panel_strip.h ('k') | chrome/browser/ui/panels/native_panel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698