Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(807)

Side by Side Diff: chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_animation_controller.mm

Issue 2505653003: [Mac[ FullscreenToolbarController Refactor (Closed)
Patch Set: nits Created 4 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright 2016 The Chromium Authors. All rights reserved. 1 // Copyright 2016 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 #import "chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_animation_control ler.h" 5 #import "chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_animation_control ler.h"
6 6
7 #import "chrome/browser/ui/cocoa/fullscreen_toolbar_controller.h" 7 #import "chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_controller.h"
8 8
9 namespace { 9 namespace {
10 10
11 // The duration of the toolbar show/hide animation in ms. 11 // The duration of the toolbar show/hide animation in ms.
12 const NSTimeInterval kToolbarAnimationDuration = 200; 12 const NSTimeInterval kToolbarAnimationDuration = 200;
13 13
14 // If the fullscreen toolbar is hidden, it is difficult for the user to see 14 // If the fullscreen toolbar is hidden, it is difficult for the user to see
15 // changes in the tabstrip. As a result, if a tab is inserted or the current 15 // changes in the tabstrip. As a result, if a tab is inserted or the current
16 // tab switched to a new one, the toolbar must animate in and out to display 16 // tab switched to a new one, the toolbar must animate in and out to display
17 // the tabstrip changes to the user. The animation drops down the toolbar and 17 // the tabstrip changes to the user. The animation drops down the toolbar and
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
87 87
88 bool FullscreenToolbarAnimationController::IsAnimationRunning() const { 88 bool FullscreenToolbarAnimationController::IsAnimationRunning() const {
89 return animation_.is_animating(); 89 return animation_.is_animating();
90 } 90 }
91 91
92 ////////////////////////////////////////////////////////////////// 92 //////////////////////////////////////////////////////////////////
93 // FullscreenToolbarAnimationController::AnimationDelegate: 93 // FullscreenToolbarAnimationController::AnimationDelegate:
94 94
95 void FullscreenToolbarAnimationController::AnimationProgressed( 95 void FullscreenToolbarAnimationController::AnimationProgressed(
96 const gfx::Animation* animation) { 96 const gfx::Animation* animation) {
97 [owner_ updateToolbar]; 97 [owner_ updateToolbarLayout];
98 } 98 }
99 99
100 void FullscreenToolbarAnimationController::AnimationEnded( 100 void FullscreenToolbarAnimationController::AnimationEnded(
101 const gfx::Animation* animation) { 101 const gfx::Animation* animation) {
102 if (animation_.IsShowing() && should_hide_toolbar_after_delay_) { 102 if (animation_.IsShowing() && should_hide_toolbar_after_delay_) {
103 hide_toolbar_timer_.Reset(); 103 hide_toolbar_timer_.Reset();
104 should_hide_toolbar_after_delay_ = false; 104 should_hide_toolbar_after_delay_ = false;
105 } 105 }
106 } 106 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698