OLD | NEW |
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 181 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
192 void PanelManager::OnPreferredWindowSizeChanged( | 192 void PanelManager::OnPreferredWindowSizeChanged( |
193 Panel* panel, const gfx::Size& preferred_window_size) { | 193 Panel* panel, const gfx::Size& preferred_window_size) { |
194 if (!auto_sizing_enabled_) | 194 if (!auto_sizing_enabled_) |
195 return; | 195 return; |
196 panel_strip_->OnWindowSizeChanged(panel, preferred_window_size); | 196 panel_strip_->OnWindowSizeChanged(panel, preferred_window_size); |
197 } | 197 } |
198 | 198 |
199 void PanelManager::ResizePanel(Panel* panel, const gfx::Size& new_size) { | 199 void PanelManager::ResizePanel(Panel* panel, const gfx::Size& new_size) { |
200 // Explicit resizing is not allowed for auto-resizable panels for now. | 200 // Explicit resizing is not allowed for auto-resizable panels for now. |
201 // http://crbug.com/109343 | 201 // http://crbug.com/109343 |
202 if (panel->auto_resizable()) | 202 if (panel->auto_resizable()) { |
| 203 LOG(INFO) << "Resizing auto-resizable Panels is not supported yet."; |
203 return; | 204 return; |
| 205 } |
204 panel_strip_->OnWindowSizeChanged(panel, new_size); | 206 panel_strip_->OnWindowSizeChanged(panel, new_size); |
205 | |
206 } | 207 } |
207 | 208 |
208 bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const { | 209 bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const { |
209 return panel_strip_->ShouldBringUpTitlebars(mouse_x, mouse_y); | 210 return panel_strip_->ShouldBringUpTitlebars(mouse_x, mouse_y); |
210 } | 211 } |
211 | 212 |
212 void PanelManager::BringUpOrDownTitlebars(bool bring_up) { | 213 void PanelManager::BringUpOrDownTitlebars(bool bring_up) { |
213 panel_strip_->BringUpOrDownTitlebars(bring_up); | 214 panel_strip_->BringUpOrDownTitlebars(bring_up); |
214 } | 215 } |
215 | 216 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
269 for (PanelOverflowStrip::Panels::const_iterator iter = | 270 for (PanelOverflowStrip::Panels::const_iterator iter = |
270 panel_overflow_strip_->panels().begin(); | 271 panel_overflow_strip_->panels().begin(); |
271 iter != panel_overflow_strip_->panels().end(); ++iter) | 272 iter != panel_overflow_strip_->panels().end(); ++iter) |
272 panels.push_back(*iter); | 273 panels.push_back(*iter); |
273 return panels; | 274 return panels; |
274 } | 275 } |
275 | 276 |
276 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { | 277 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { |
277 panel_mouse_watcher_.reset(watcher); | 278 panel_mouse_watcher_.reset(watcher); |
278 } | 279 } |
OLD | NEW |