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

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

Issue 9517010: Change panels to be able to turn off autoresize. (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
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/panel_manager.h" 5 #include "chrome/browser/ui/panels/panel_manager.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "chrome/browser/fullscreen.h" 10 #include "chrome/browser/fullscreen.h"
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after
175 void PanelManager::OnPreferredWindowSizeChanged( 175 void PanelManager::OnPreferredWindowSizeChanged(
176 Panel* panel, const gfx::Size& preferred_window_size) { 176 Panel* panel, const gfx::Size& preferred_window_size) {
177 if (!auto_sizing_enabled_) { 177 if (!auto_sizing_enabled_) {
178 LOG(INFO) << "Resizing auto-resizable Panels is not supported yet."; 178 LOG(INFO) << "Resizing auto-resizable Panels is not supported yet.";
179 return; 179 return;
180 } 180 }
181 docked_strip_->ResizePanelWindow(panel, preferred_window_size); 181 docked_strip_->ResizePanelWindow(panel, preferred_window_size);
182 } 182 }
183 183
184 void PanelManager::ResizePanel(Panel* panel, const gfx::Size& new_size) { 184 void PanelManager::ResizePanel(Panel* panel, const gfx::Size& new_size) {
185 // Explicit resizing is not allowed for auto-resizable panels for now. 185 // Resizing a panel will make it not auto-resizable.
186 // http://crbug.com/109343 186 panel->SetAutoResizable(false);
jennb 2012/02/28 23:45:15 When this calls DisableAutoResize, it passes the r
levin 2012/02/29 00:04:43 I moved this to be inside of ResizePanelWindow. I
187 if (panel->auto_resizable())
188 return;
189
190 docked_strip_->ResizePanelWindow(panel, new_size); 187 docked_strip_->ResizePanelWindow(panel, new_size);
191 } 188 }
192 189
193 bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const { 190 bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const {
194 return docked_strip_->ShouldBringUpTitlebars(mouse_x, mouse_y); 191 return docked_strip_->ShouldBringUpTitlebars(mouse_x, mouse_y);
195 } 192 }
196 193
197 void PanelManager::BringUpOrDownTitlebars(bool bring_up) { 194 void PanelManager::BringUpOrDownTitlebars(bool bring_up) {
198 docked_strip_->BringUpOrDownTitlebars(bring_up); 195 docked_strip_->BringUpOrDownTitlebars(bring_up);
199 } 196 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 return panels; 268 return panels;
272 } 269 }
273 270
274 int PanelManager::overflow_strip_width() const { 271 int PanelManager::overflow_strip_width() const {
275 return kOverflowStripThickness; 272 return kOverflowStripThickness;
276 } 273 }
277 274
278 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { 275 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) {
279 panel_mouse_watcher_.reset(watcher); 276 panel_mouse_watcher_.reset(watcher);
280 } 277 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698