| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 } | 179 } |
| 180 | 180 |
| 181 void PanelManager::OnPanelExpansionStateChanged( | 181 void PanelManager::OnPanelExpansionStateChanged( |
| 182 Panel* panel, Panel::ExpansionState old_state) { | 182 Panel* panel, Panel::ExpansionState old_state) { |
| 183 if (panel->expansion_state() == Panel::IN_OVERFLOW) | 183 if (panel->expansion_state() == Panel::IN_OVERFLOW) |
| 184 panel_overflow_strip_->OnPanelExpansionStateChanged(panel, old_state); | 184 panel_overflow_strip_->OnPanelExpansionStateChanged(panel, old_state); |
| 185 else | 185 else |
| 186 panel_strip_->OnPanelExpansionStateChanged(panel, old_state); | 186 panel_strip_->OnPanelExpansionStateChanged(panel, old_state); |
| 187 } | 187 } |
| 188 | 188 |
| 189 void PanelManager::OnPanelAttentionStateChanged(Panel* panel) { | |
| 190 if (panel->expansion_state() == Panel::IN_OVERFLOW) | |
| 191 panel_overflow_strip_->OnPanelAttentionStateChanged(panel); | |
| 192 } | |
| 193 | |
| 194 void PanelManager::OnPreferredWindowSizeChanged( | 189 void PanelManager::OnPreferredWindowSizeChanged( |
| 195 Panel* panel, const gfx::Size& preferred_window_size) { | 190 Panel* panel, const gfx::Size& preferred_window_size) { |
| 196 if (!auto_sizing_enabled_) | 191 if (!auto_sizing_enabled_) |
| 197 return; | 192 return; |
| 198 panel_strip_->OnPreferredWindowSizeChanged(panel, preferred_window_size); | 193 panel_strip_->OnPreferredWindowSizeChanged(panel, preferred_window_size); |
| 199 } | 194 } |
| 200 | 195 |
| 201 bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const { | 196 bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const { |
| 202 return panel_strip_->ShouldBringUpTitlebars(mouse_x, mouse_y); | 197 return panel_strip_->ShouldBringUpTitlebars(mouse_x, mouse_y); |
| 203 } | 198 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 262 for (PanelOverflowStrip::Panels::const_iterator iter = | 257 for (PanelOverflowStrip::Panels::const_iterator iter = |
| 263 panel_overflow_strip_->panels().begin(); | 258 panel_overflow_strip_->panels().begin(); |
| 264 iter != panel_overflow_strip_->panels().end(); ++iter) | 259 iter != panel_overflow_strip_->panels().end(); ++iter) |
| 265 panels.push_back(*iter); | 260 panels.push_back(*iter); |
| 266 return panels; | 261 return panels; |
| 267 } | 262 } |
| 268 | 263 |
| 269 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { | 264 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { |
| 270 panel_mouse_watcher_.reset(watcher); | 265 panel_mouse_watcher_.reset(watcher); |
| 271 } | 266 } |
| OLD | NEW |