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

Unified 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: fix assert at the end of RenderWidget::Resize which fixes the tests on OSX. Created 8 years, 10 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | chrome/browser/ui/panels/panel_overflow_browsertest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/panels/panel_manager.cc
diff --git a/chrome/browser/ui/panels/panel_manager.cc b/chrome/browser/ui/panels/panel_manager.cc
index c918b8a0d9c510fdc0e6ec7146f1df72df4e3fa5..bb8323ada49a694eb409dddd68f8ab31e797ec42 100644
--- a/chrome/browser/ui/panels/panel_manager.cc
+++ b/chrome/browser/ui/panels/panel_manager.cc
@@ -174,22 +174,15 @@ void PanelManager::OnPanelExpansionStateChanged(Panel* panel) {
docked_strip_->OnPanelExpansionStateChanged(panel);
}
-void PanelManager::OnPreferredWindowSizeChanged(
- Panel* panel, const gfx::Size& preferred_window_size) {
- if (!auto_sizing_enabled_) {
- LOG(INFO) << "Resizing auto-resizable Panels is not supported yet.";
- return;
- }
+void PanelManager::OnWindowAutoResized(Panel* panel,
+ const gfx::Size& preferred_window_size) {
+ DCHECK(auto_sizing_enabled_);
docked_strip_->ResizePanelWindow(panel, preferred_window_size);
}
void PanelManager::ResizePanel(Panel* panel, const gfx::Size& new_size) {
- // Explicit resizing is not allowed for auto-resizable panels for now.
- // http://crbug.com/109343
- if (panel->auto_resizable())
- return;
-
docked_strip_->ResizePanelWindow(panel, new_size);
+ panel->SetAutoResizable(false);
}
bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const {
« no previous file with comments | « chrome/browser/ui/panels/panel_manager.h ('k') | chrome/browser/ui/panels/panel_overflow_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698