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

Side by Side Diff: ash/rotator/test/screen_rotation_animator_test_api.h

Issue 2728803002: Handles users rotating screen too early (Closed)
Patch Set: Add MultiLayerAnimatorTestController to controll test animation. 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
OLDNEW
(Empty)
1 // Copyright (c) 2017 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef ASH_ROTATOR_TEST_SCREEN_ROTATION_ANIMATOR_TEST_API_H_
6 #define ASH_ROTATOR_TEST_SCREEN_ROTATION_ANIMATOR_TEST_API_H_
7
8 #include <stdint.h>
9
10 #include "base/macros.h"
11 #include "ui/compositor/test/multi_layer_animator_test_controller.h"
12 #include "ui/compositor/test/multi_layer_animator_test_controller_delegate.h"
13
14 namespace ui {
15 class Layer;
16 }
17
18 namespace ash {
19 class ScreenRotationAnimator;
20
21 namespace test {
22
23 // Test API to provide internal access to a ScreenRotationAnimator instance.
24 // This can also be used to control the screen rotation animations via the
25 // ui::test::MultiLayerAnimatorTestController API.
26 class ScreenRotationAnimatorTestApi
bruthig 2017/03/15 23:12:38 This looks GREAT, I'm so happy it was possible to
wutao 2017/03/16 07:37:59 Acknowledged.
27 : public ui::test::MultiLayerAnimatorTestController,
28 public ui::test::MultiLayerAnimatorTestControllerDelegate {
29 public:
30 explicit ScreenRotationAnimatorTestApi(ScreenRotationAnimator* animator);
31 ~ScreenRotationAnimatorTestApi() override;
32
33 // Wrapper functions for ScreenRotationAnimator.
34 ui::Layer* GetOldLayerTreeRootLayer();
35 void SetDisableAnimationTimers(bool disable_timers);
36
37 protected:
38 // MultiLayerAnimatorTestControllerDelegate:
39 std::vector<ui::LayerAnimator*> GetLayerAnimators() override;
40
41 private:
42 ScreenRotationAnimator* animator_;
43
44 DISALLOW_COPY_AND_ASSIGN(ScreenRotationAnimatorTestApi);
45 };
46
47 } // namespace test
48 } // namespace ash
49
50 #endif // ASH_ROTATOR_TEST_SCREEN_ROTATION_ANIMATOR_TEST_API_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698