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

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

Issue 2516803002: [Mac] Tests for FullscreenToolbarController (Closed)
Patch Set: Fix for rsesek Created 4 years 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 #ifndef CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_ANIMATION_CONTROLL ER_H_ 5 #ifndef CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_ANIMATION_CONTROLL ER_H_
6 #define CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_ANIMATION_CONTROLL ER_H_ 6 #define CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_ANIMATION_CONTROLL ER_H_
7 7
8 #import <Cocoa/Cocoa.h> 8 #import <Cocoa/Cocoa.h>
9 9
10 #include "base/timer/timer.h" 10 #include "base/timer/timer.h"
(...skipping 24 matching lines...) Expand all
35 // Animates the toolbar out if it's not focused. 35 // Animates the toolbar out if it's not focused.
36 void AnimateToolbarOutIfPossible(); 36 void AnimateToolbarOutIfPossible();
37 37
38 // Returns the fraction of the toolbar exposed at the top according to the 38 // Returns the fraction of the toolbar exposed at the top according to the
39 // animation's progress. 39 // animation's progress.
40 CGFloat GetToolbarFractionFromProgress() const; 40 CGFloat GetToolbarFractionFromProgress() const;
41 41
42 // Returns true if |animation_| is running. 42 // Returns true if |animation_| is running.
43 bool IsAnimationRunning() const; 43 bool IsAnimationRunning() const;
44 44
45 // Only for testing. Sets the duration of |animation_|.
46 void SetAnimationDuration(CGFloat duration);
47
45 // gfx::AnimationDelegate: 48 // gfx::AnimationDelegate:
46 void AnimationProgressed(const gfx::Animation* animation) override; 49 void AnimationProgressed(const gfx::Animation* animation) override;
47 void AnimationEnded(const gfx::Animation* animation) override; 50 void AnimationEnded(const gfx::Animation* animation) override;
48 51
49 private: 52 private:
50 // Our owner. 53 // Our owner.
51 FullscreenToolbarController* owner_; // weak 54 FullscreenToolbarController* owner_; // weak
52 55
53 // The animation of the decoration. 56 // The animation of the decoration.
54 gfx::SlideAnimation animation_; 57 gfx::SlideAnimation animation_;
55 58
56 // Timer that will start the scrollbar's hiding animation when it reaches 0. 59 // Timer that will start the scrollbar's hiding animation when it reaches 0.
57 base::Timer hide_toolbar_timer_; 60 base::Timer hide_toolbar_timer_;
58 61
59 // The value that the animation should start from. 62 // The value that the animation should start from.
60 CGFloat animation_start_value_; 63 CGFloat animation_start_value_;
61 64
62 // True when the toolbar is dropped to show tabstrip changes. 65 // True when the toolbar is dropped to show tabstrip changes.
63 BOOL should_hide_toolbar_after_delay_; 66 BOOL should_hide_toolbar_after_delay_;
64 }; 67 };
65 68
66 #endif // CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_ANIMATION_CONTR OLLER_H_ 69 #endif // CHROME_BROWSER_UI_COCOA_FULLSCREEN_FULLSCREEN_TOOLBAR_ANIMATION_CONTR OLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698