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_overflow_strip.h" | 5 #include "chrome/browser/ui/panels/panel_overflow_strip.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "chrome/browser/ui/panels/panel_manager.h" | 8 #include "chrome/browser/ui/panels/panel_manager.h" |
9 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" | 9 #include "chrome/browser/ui/panels/panel_mouse_watcher.h" |
10 #include "chrome/browser/ui/panels/panel_strip.h" | 10 #include "chrome/browser/ui/panels/panel_strip.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 } | 190 } |
191 } else { | 191 } else { |
192 overflow_hover_animator_start_width_ = kOverflowAreaHoverWidth; | 192 overflow_hover_animator_start_width_ = kOverflowAreaHoverWidth; |
193 overflow_hover_animator_end_width_ = display_area_.width(); | 193 overflow_hover_animator_end_width_ = display_area_.width(); |
194 } | 194 } |
195 | 195 |
196 if (!overflow_hover_animator_.get()) | 196 if (!overflow_hover_animator_.get()) |
197 overflow_hover_animator_.reset(new ui::SlideAnimation(this)); | 197 overflow_hover_animator_.reset(new ui::SlideAnimation(this)); |
198 if (overflow_hover_animator_->IsShowing()) | 198 if (overflow_hover_animator_->IsShowing()) |
199 overflow_hover_animator_->Reset(); | 199 overflow_hover_animator_->Reset(); |
200 overflow_hover_animator_->SetSlideDuration(kOverflowHoverAnimationMs); | 200 overflow_hover_animator_->SetSlideDuration( |
| 201 PanelManager::AdjustTimeInterval(kOverflowHoverAnimationMs)); |
201 | 202 |
202 overflow_hover_animator_->Show(); | 203 overflow_hover_animator_->Show(); |
203 } | 204 } |
204 | 205 |
205 void PanelOverflowStrip::AnimationProgressed(const ui::Animation* animation) { | 206 void PanelOverflowStrip::AnimationProgressed(const ui::Animation* animation) { |
206 int current_width = overflow_hover_animator_->CurrentValueBetween( | 207 int current_width = overflow_hover_animator_->CurrentValueBetween( |
207 overflow_hover_animator_start_width_, overflow_hover_animator_end_width_); | 208 overflow_hover_animator_start_width_, overflow_hover_animator_end_width_); |
208 bool end_of_shrinking = current_width == display_area_.width(); | 209 bool end_of_shrinking = current_width == display_area_.width(); |
209 | 210 |
210 // Update each overflow panel. | 211 // Update each overflow panel. |
(...skipping 10 matching lines...) Expand all Loading... |
221 } | 222 } |
222 | 223 |
223 overflow_panel->SetPanelBoundsInstantly(bounds); | 224 overflow_panel->SetPanelBoundsInstantly(bounds); |
224 } | 225 } |
225 } | 226 } |
226 | 227 |
227 void PanelOverflowStrip::OnFullScreenModeChanged(bool is_full_screen) { | 228 void PanelOverflowStrip::OnFullScreenModeChanged(bool is_full_screen) { |
228 for (size_t i = 0; i < panels_.size(); ++i) | 229 for (size_t i = 0; i < panels_.size(); ++i) |
229 panels_[i]->FullScreenModeChanged(is_full_screen); | 230 panels_[i]->FullScreenModeChanged(is_full_screen); |
230 } | 231 } |
OLD | NEW |