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

Unified Diff: ash/rotator/screen_rotation_animator.h

Issue 2771713004: Adds UMA for screen rotation animation smoothness. (Closed)
Patch Set: Adds histograms.xml. 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | ash/rotator/screen_rotation_animator.cc » ('j') | ash/rotator/screen_rotation_animator.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/rotator/screen_rotation_animator.h
diff --git a/ash/rotator/screen_rotation_animator.h b/ash/rotator/screen_rotation_animator.h
index ac6f18a83569e0e1aeab745949ba9149bf5342fd..1dd82b8cda1e7b578e67178defc1ff4836788914 100644
--- a/ash/rotator/screen_rotation_animator.h
+++ b/ash/rotator/screen_rotation_animator.h
@@ -49,13 +49,15 @@ class ASH_EXPORT ScreenRotationAnimator {
void RemoveScreenRotationAnimatorObserver(
ScreenRotationAnimatorObserver* observer);
- void OnLayerAnimationEnded();
-
- void OnLayerAnimationAborted();
+ // When screen rotation animation is ended or aborted, if the request queue is
+ // not empty, it will call |Rotate()| with the pending rotation request.
+ // Otherwise it will notify |screen_rotation_animator_observer_|.
varkha 2017/03/24 20:38:22 Change to declarative as in "When screen rotation
wutao 2017/03/24 21:48:24 Thanks. Done.
+ void ProcessAnimationQueue();
private:
friend class ash::test::ScreenRotationAnimatorTestApi;
struct ScreenRotationRequest;
+ class ScreenRotationAnimationMetricsReporter;
// Set the screen orientation to |new_rotation| and animate the change. The
// animation will rotate the initial orientation's layer towards the new
@@ -64,11 +66,6 @@ class ASH_EXPORT ScreenRotationAnimator {
// |rotation_degrees| arc.
void AnimateRotation(std::unique_ptr<ScreenRotationRequest> rotation_request);
- // When screen rotation animation is ended or aborted, if the request queue is
- // not empty, it will call |Rotate()| with the pending rotation request.
- // Otherwise it will notify |screen_rotation_animator_observer_|.
- void ProcessAnimationQueue();
-
void set_disable_animation_timers_for_test(bool disable_timers);
void StopAnimating();
@@ -76,6 +73,7 @@ class ASH_EXPORT ScreenRotationAnimator {
// The id of the display to rotate.
int64_t display_id_;
bool is_rotating_;
+ std::unique_ptr<ScreenRotationAnimationMetricsReporter> metrics_reporter_;
// Only set in unittest to disable animation timers.
bool disable_animation_timers_for_test_;
base::ObserverList<ScreenRotationAnimatorObserver>
« no previous file with comments | « no previous file | ash/rotator/screen_rotation_animator.cc » ('j') | ash/rotator/screen_rotation_animator.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698