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/detached_panel_strip.cc

Issue 10260001: Remove panel size limit when user resizes it. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch for landing Created 8 years, 7 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 | « no previous file | chrome/browser/ui/panels/docked_panel_strip.cc » ('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/detached_panel_strip.h" 5 #include "chrome/browser/ui/panels/detached_panel_strip.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "chrome/browser/ui/panels/panel_drag_controller.h" 9 #include "chrome/browser/ui/panels/panel_drag_controller.h"
10 #include "chrome/browser/ui/panels/panel_manager.h" 10 #include "chrome/browser/ui/panels/panel_manager.h"
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
70 70
71 void DetachedPanelStrip::ResizePanelWindow( 71 void DetachedPanelStrip::ResizePanelWindow(
72 Panel* panel, 72 Panel* panel,
73 const gfx::Size& preferred_window_size) { 73 const gfx::Size& preferred_window_size) {
74 // We should get this call only of we have the panel. 74 // We should get this call only of we have the panel.
75 DCHECK_EQ(this, panel->panel_strip()); 75 DCHECK_EQ(this, panel->panel_strip());
76 76
77 // Make sure the new size does not violate panel's size restrictions. 77 // Make sure the new size does not violate panel's size restrictions.
78 gfx::Size new_size(preferred_window_size.width(), 78 gfx::Size new_size(preferred_window_size.width(),
79 preferred_window_size.height()); 79 preferred_window_size.height());
80 panel->ClampSize(&new_size); 80 new_size = panel->ClampSize(new_size);
81 81
82 // Update restored size. 82 // Update restored size.
83 if (new_size != panel->full_size()) 83 if (new_size != panel->full_size())
84 panel->set_full_size(new_size); 84 panel->set_full_size(new_size);
85 85
86 gfx::Rect bounds = panel->GetBounds(); 86 gfx::Rect bounds = panel->GetBounds();
87 87
88 // When we resize a detached panel, its origin does not move. 88 // When we resize a detached panel, its origin does not move.
89 // So we set height and width only. 89 // So we set height and width only.
90 bounds.set_size(new_size); 90 bounds.set_size(new_size);
(...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after
194 panel->set_attention_mode( 194 panel->set_attention_mode(
195 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION | 195 static_cast<Panel::AttentionMode>(Panel::USE_PANEL_ATTENTION |
196 Panel::USE_SYSTEM_ATTENTION)); 196 Panel::USE_SYSTEM_ATTENTION));
197 panel->SetAlwaysOnTop(false); 197 panel->SetAlwaysOnTop(false);
198 panel->EnableResizeByMouse(true); 198 panel->EnableResizeByMouse(true);
199 } 199 }
200 200
201 void DetachedPanelStrip::OnPanelActiveStateChanged(Panel* panel) { 201 void DetachedPanelStrip::OnPanelActiveStateChanged(Panel* panel) {
202 } 202 }
203 203
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/panels/docked_panel_strip.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698