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

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

Issue 2768843002: [Mac] Fullscreen Toolbar Fixes (Closed)
Patch Set: 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 animation_.Show(); 69 animation_.Show();
70 } 70 }
71 71
72 void FullscreenToolbarAnimationController::AnimateToolbarOutIfPossible() { 72 void FullscreenToolbarAnimationController::AnimateToolbarOutIfPossible() {
73 if (![owner_ isInFullscreen] || [owner_ mustShowFullscreenToolbar]) 73 if (![owner_ isInFullscreen] || [owner_ mustShowFullscreenToolbar])
74 return; 74 return;
75 75
76 if (animation_.IsClosing()) 76 if (animation_.IsClosing())
77 return; 77 return;
78 78
79 animation_.Reset(animation_start_value_); 79 animation_.Stop();
80 animation_.Hide(); 80 animation_.Hide();
81 } 81 }
82 82
83 CGFloat FullscreenToolbarAnimationController::GetToolbarFractionFromProgress() 83 CGFloat FullscreenToolbarAnimationController::GetToolbarFractionFromProgress()
84 const { 84 const {
85 return animation_.GetCurrentValue(); 85 return animation_.GetCurrentValue();
86 } 86 }
87 87
88 bool FullscreenToolbarAnimationController::IsAnimationRunning() const { 88 bool FullscreenToolbarAnimationController::IsAnimationRunning() const {
89 return animation_.is_animating(); 89 return animation_.is_animating();
(...skipping 12 matching lines...) Expand all
102 [owner_ updateToolbarLayout]; 102 [owner_ updateToolbarLayout];
103 } 103 }
104 104
105 void FullscreenToolbarAnimationController::AnimationEnded( 105 void FullscreenToolbarAnimationController::AnimationEnded(
106 const gfx::Animation* animation) { 106 const gfx::Animation* animation) {
107 if (animation_.IsShowing() && should_hide_toolbar_after_delay_) { 107 if (animation_.IsShowing() && should_hide_toolbar_after_delay_) {
108 hide_toolbar_timer_.Reset(); 108 hide_toolbar_timer_.Reset();
109 should_hide_toolbar_after_delay_ = false; 109 should_hide_toolbar_after_delay_ = false;
110 } 110 }
111 } 111 }
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