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

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

Issue 2738043002: [Mac] Fullscreen Toolbar Fixes (Closed)
Patch Set: Fixed test Created 3 years, 9 months 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
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.mm ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/fullscreen_toolbar_controller.h" 7 #import "chrome/browser/ui/cocoa/fullscreen/fullscreen_toolbar_controller.h"
8 8
9 namespace { 9 namespace {
10 10
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 animation_.Show(); 71 animation_.Show();
72 } 72 }
73 73
74 void FullscreenToolbarAnimationController::AnimateToolbarOutIfPossible() { 74 void FullscreenToolbarAnimationController::AnimateToolbarOutIfPossible() {
75 if (![owner_ isInFullscreen] || [owner_ mustShowFullscreenToolbar]) 75 if (![owner_ isInFullscreen] || [owner_ mustShowFullscreenToolbar])
76 return; 76 return;
77 77
78 if (animation_.IsClosing()) 78 if (animation_.IsClosing())
79 return; 79 return;
80 80
81 animation_.Reset(animation_start_value_); 81 animation_.Stop();
82 animation_.Hide(); 82 animation_.Hide();
83 } 83 }
84 84
85 CGFloat FullscreenToolbarAnimationController::GetToolbarFractionFromProgress() 85 CGFloat FullscreenToolbarAnimationController::GetToolbarFractionFromProgress()
86 const { 86 const {
87 return animation_.GetCurrentValue(); 87 return animation_.GetCurrentValue();
88 } 88 }
89 89
90 bool FullscreenToolbarAnimationController::IsAnimationRunning() const { 90 bool FullscreenToolbarAnimationController::IsAnimationRunning() const {
91 return animation_.is_animating(); 91 return animation_.is_animating();
(...skipping 12 matching lines...) Expand all
104 [owner_ updateToolbarLayout]; 104 [owner_ updateToolbarLayout];
105 } 105 }
106 106
107 void FullscreenToolbarAnimationController::AnimationEnded( 107 void FullscreenToolbarAnimationController::AnimationEnded(
108 const gfx::Animation* animation) { 108 const gfx::Animation* animation) {
109 if (animation_.IsShowing() && should_hide_toolbar_after_delay_) { 109 if (animation_.IsShowing() && should_hide_toolbar_after_delay_) {
110 hide_toolbar_timer_.Reset(); 110 hide_toolbar_timer_.Reset();
111 should_hide_toolbar_after_delay_ = false; 111 should_hide_toolbar_after_delay_ = false;
112 } 112 }
113 } 113 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/cocoa/browser_window_controller_private.mm ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698