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

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

Issue 23918002: Switch to doing user-resizing via system for panels on Mac (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Patch to reland 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);
630 panel->UpdateMinimizeRestoreButtonVisibility(); 629 panel->UpdateMinimizeRestoreButtonVisibility();
631 UpdatePanelCornerStyle(panel); 630 UpdatePanelCornerStyle(panel);
632 } 631 }
633 632
634 void StackedPanelCollection::OnPanelExpansionStateChanged(Panel* panel) { 633 void StackedPanelCollection::OnPanelExpansionStateChanged(Panel* panel) {
635 DCHECK_NE(Panel::MINIMIZED, panel->expansion_state()); 634 DCHECK_NE(Panel::MINIMIZED, panel->expansion_state());
636 635
637 // Ensure minimized panel does not get the focus. If minimizing all, 636 // Ensure minimized panel does not get the focus. If minimizing all,
638 // the active panel will be deactivated once when all panels are minimized 637 // the active panel will be deactivated once when all panels are minimized
639 // rather than per minimized panel. 638 // rather than per minimized panel.
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
784 if (available_space < 0) 783 if (available_space < 0)
785 available_space = 0; 784 available_space = 0;
786 return available_space; 785 return available_space;
787 } 786 }
788 787
789 NativePanelStackWindow* StackedPanelCollection::GetStackWindowForPanel( 788 NativePanelStackWindow* StackedPanelCollection::GetStackWindowForPanel(
790 Panel* panel) const { 789 Panel* panel) const {
791 return secondary_stack_window_ && secondary_stack_window_->HasPanel(panel) ? 790 return secondary_stack_window_ && secondary_stack_window_->HasPanel(panel) ?
792 secondary_stack_window_ : primary_stack_window_; 791 secondary_stack_window_ : primary_stack_window_;
793 } 792 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/panels/stacked_panel_browsertest.cc ('k') | chrome/browser/ui/views/panels/panel_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698