| 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.h" | 5 #include "chrome/browser/ui/panels/panel.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/message_loop.h" | 8 #include "base/message_loop.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/browser.h" | 10 #include "chrome/browser/ui/browser.h" |
| (...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 204 } | 204 } |
| 205 | 205 |
| 206 void Panel::SetPreviewMode(bool in_preview) { | 206 void Panel::SetPreviewMode(bool in_preview) { |
| 207 DCHECK_NE(in_preview_mode_, in_preview); | 207 DCHECK_NE(in_preview_mode_, in_preview); |
| 208 in_preview_mode_ = in_preview; | 208 in_preview_mode_ = in_preview; |
| 209 } | 209 } |
| 210 | 210 |
| 211 void Panel::SetExpansionState(ExpansionState new_state) { | 211 void Panel::SetExpansionState(ExpansionState new_state) { |
| 212 if (expansion_state_ == new_state) | 212 if (expansion_state_ == new_state) |
| 213 return; | 213 return; |
| 214 native_panel_->PanelExpansionStateChanging(expansion_state_, new_state); |
| 214 expansion_state_ = new_state; | 215 expansion_state_ = new_state; |
| 215 | 216 |
| 216 manager()->OnPanelExpansionStateChanged(this); | 217 manager()->OnPanelExpansionStateChanged(this); |
| 217 | 218 |
| 218 DCHECK(initialized_ && panel_strip_ != NULL); | 219 DCHECK(initialized_ && panel_strip_ != NULL); |
| 219 native_panel_->PreventActivationByOS(panel_strip_->IsPanelMinimized(this)); | 220 native_panel_->PreventActivationByOS(panel_strip_->IsPanelMinimized(this)); |
| 220 UpdateMinimizeRestoreButtonVisibility(); | 221 UpdateMinimizeRestoreButtonVisibility(); |
| 221 | 222 |
| 222 content::NotificationService::current()->Notify( | 223 content::NotificationService::current()->Notify( |
| 223 chrome::NOTIFICATION_PANEL_CHANGED_EXPANSION_STATE, | 224 chrome::NOTIFICATION_PANEL_CHANGED_EXPANSION_STATE, |
| (...skipping 562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 786 max_size_policy_ = CUSTOM_MAX_SIZE; | 787 max_size_policy_ = CUSTOM_MAX_SIZE; |
| 787 } | 788 } |
| 788 | 789 |
| 789 void Panel::OnPanelEndUserResizing() { | 790 void Panel::OnPanelEndUserResizing() { |
| 790 SetPreviewMode(false); | 791 SetPreviewMode(false); |
| 791 } | 792 } |
| 792 | 793 |
| 793 void Panel::DestroyBrowser() { | 794 void Panel::DestroyBrowser() { |
| 794 native_panel_->DestroyPanelBrowser(); | 795 native_panel_->DestroyPanelBrowser(); |
| 795 } | 796 } |
| OLD | NEW |