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

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: code review fixes 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.
186 // http://crbug.com/109343
187 if (panel->auto_resizable())
188 return;
189
190 docked_strip_->ResizePanelWindow(panel, new_size); 185 docked_strip_->ResizePanelWindow(panel, new_size);
191 } 186 }
192 187
193 bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const { 188 bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const {
194 return docked_strip_->ShouldBringUpTitlebars(mouse_x, mouse_y); 189 return docked_strip_->ShouldBringUpTitlebars(mouse_x, mouse_y);
195 } 190 }
196 191
197 void PanelManager::BringUpOrDownTitlebars(bool bring_up) { 192 void PanelManager::BringUpOrDownTitlebars(bool bring_up) {
198 docked_strip_->BringUpOrDownTitlebars(bring_up); 193 docked_strip_->BringUpOrDownTitlebars(bring_up);
199 } 194 }
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
271 return panels; 266 return panels;
272 } 267 }
273 268
274 int PanelManager::overflow_strip_width() const { 269 int PanelManager::overflow_strip_width() const {
275 return kOverflowStripThickness; 270 return kOverflowStripThickness;
276 } 271 }
277 272
278 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { 273 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) {
279 panel_mouse_watcher_.reset(watcher); 274 panel_mouse_watcher_.reset(watcher);
280 } 275 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698