| 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 |
| 189 void PanelManager::OnPreferredWindowSizeChanged( | 194 void PanelManager::OnPreferredWindowSizeChanged( |
| 190 Panel* panel, const gfx::Size& preferred_window_size) { | 195 Panel* panel, const gfx::Size& preferred_window_size) { |
| 191 if (!auto_sizing_enabled_) | 196 if (!auto_sizing_enabled_) |
| 192 return; | 197 return; |
| 193 panel_strip_->OnPreferredWindowSizeChanged(panel, preferred_window_size); | 198 panel_strip_->OnPreferredWindowSizeChanged(panel, preferred_window_size); |
| 194 } | 199 } |
| 195 | 200 |
| 196 bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const { | 201 bool PanelManager::ShouldBringUpTitlebars(int mouse_x, int mouse_y) const { |
| 197 return panel_strip_->ShouldBringUpTitlebars(mouse_x, mouse_y); | 202 return panel_strip_->ShouldBringUpTitlebars(mouse_x, mouse_y); |
| 198 } | 203 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 257 for (PanelOverflowStrip::Panels::const_iterator iter = | 262 for (PanelOverflowStrip::Panels::const_iterator iter = |
| 258 panel_overflow_strip_->panels().begin(); | 263 panel_overflow_strip_->panels().begin(); |
| 259 iter != panel_overflow_strip_->panels().end(); ++iter) | 264 iter != panel_overflow_strip_->panels().end(); ++iter) |
| 260 panels.push_back(*iter); | 265 panels.push_back(*iter); |
| 261 return panels; | 266 return panels; |
| 262 } | 267 } |
| 263 | 268 |
| 264 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { | 269 void PanelManager::SetMouseWatcher(PanelMouseWatcher* watcher) { |
| 265 panel_mouse_watcher_.reset(watcher); | 270 panel_mouse_watcher_.reset(watcher); |
| 266 } | 271 } |
| OLD | NEW |