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

Side by Side Diff: trunk/src/chrome/browser/ui/panels/stacked_panel_collection.cc

Issue 23922003: Revert 221651 "Switch to doing user-resizing via system for pane..." (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 7 years, 3 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
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/stacked_panel_collection.h" 5 #include "chrome/browser/ui/panels/stacked_panel_collection.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "base/auto_reset.h" 8 #include "base/auto_reset.h"
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/strings/utf_string_conversions.h" 10 #include "base/strings/utf_string_conversions.h"
(...skipping 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
619 619
620 bool StackedPanelCollection::HasPanel(Panel* panel) const { 620 bool StackedPanelCollection::HasPanel(Panel* panel) const {
621 return std::find(panels_.begin(), panels_.end(), panel) != panels_.end(); 621 return std::find(panels_.begin(), panels_.end(), panel) != panels_.end();
622 } 622 }
623 623
624 void StackedPanelCollection::UpdatePanelOnCollectionChange(Panel* panel) { 624 void StackedPanelCollection::UpdatePanelOnCollectionChange(Panel* panel) {
625 panel->set_attention_mode( 625 panel->set_attention_mode(
626 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION | 626 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION |
627 Panel::USE_SYSTEM_ATTENTION)); 627 Panel::USE_SYSTEM_ATTENTION));
628 panel->ShowShadow(false); 628 panel->ShowShadow(false);
629 panel->EnableResizeByMouse(true);
629 panel->UpdateMinimizeRestoreButtonVisibility(); 630 panel->UpdateMinimizeRestoreButtonVisibility();
630 UpdatePanelCornerStyle(panel); 631 UpdatePanelCornerStyle(panel);
631 } 632 }
632 633
633 void StackedPanelCollection::OnPanelExpansionStateChanged(Panel* panel) { 634 void StackedPanelCollection::OnPanelExpansionStateChanged(Panel* panel) {
634 DCHECK_NE(Panel::MINIMIZED, panel->expansion_state()); 635 DCHECK_NE(Panel::MINIMIZED, panel->expansion_state());
635 636
636 // Ensure minimized panel does not get the focus. If minimizing all, 637 // Ensure minimized panel does not get the focus. If minimizing all,
637 // the active panel will be deactivated once when all panels are minimized 638 // the active panel will be deactivated once when all panels are minimized
638 // rather than per minimized panel. 639 // rather than per minimized panel.
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
783 if (available_space < 0) 784 if (available_space < 0)
784 available_space = 0; 785 available_space = 0;
785 return available_space; 786 return available_space;
786 } 787 }
787 788
788 NativePanelStackWindow* StackedPanelCollection::GetStackWindowForPanel( 789 NativePanelStackWindow* StackedPanelCollection::GetStackWindowForPanel(
789 Panel* panel) const { 790 Panel* panel) const {
790 return secondary_stack_window_ && secondary_stack_window_->HasPanel(panel) ? 791 return secondary_stack_window_ && secondary_stack_window_->HasPanel(panel) ?
791 secondary_stack_window_ : primary_stack_window_; 792 secondary_stack_window_ : primary_stack_window_;
792 } 793 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/ui/panels/panel.cc ('k') | trunk/src/chrome/browser/ui/views/panels/panel_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698