OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_ |
6 #define COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_ | 6 #define COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_ |
7 | 7 |
| 8 #include "base/compiler_specific.h" |
8 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "components/test_runner/test_runner_export.h" |
9 #include "third_party/WebKit/public/platform/WebLockOrientationCallback.h" | 11 #include "third_party/WebKit/public/platform/WebLockOrientationCallback.h" |
10 #include "third_party/WebKit/public/platform/WebScreenOrientationClient.h" | 12 #include "third_party/WebKit/public/platform/WebScreenOrientationClient.h" |
11 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" | 13 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" |
12 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" | 14 #include "third_party/WebKit/public/platform/WebScreenOrientationType.h" |
13 | 15 |
14 namespace blink { | 16 namespace blink { |
15 class WebLocalFrame; | 17 class WebLocalFrame; |
16 } | 18 } |
17 | 19 |
18 namespace test_runner { | 20 namespace test_runner { |
19 | 21 |
20 class MockScreenOrientationClient : public blink::WebScreenOrientationClient { | 22 class TEST_RUNNER_EXPORT MockScreenOrientationClient |
| 23 : public NON_EXPORTED_BASE(blink::WebScreenOrientationClient) { |
21 public: | 24 public: |
22 explicit MockScreenOrientationClient(); | 25 explicit MockScreenOrientationClient(); |
23 virtual ~MockScreenOrientationClient(); | 26 virtual ~MockScreenOrientationClient(); |
24 | 27 |
25 void ResetData(); | 28 void ResetData(); |
26 void UpdateDeviceOrientation(blink::WebLocalFrame* main_frame, | 29 void UpdateDeviceOrientation(blink::WebLocalFrame* main_frame, |
27 blink::WebScreenOrientationType orientation); | 30 blink::WebScreenOrientationType orientation); |
28 | 31 |
29 blink::WebScreenOrientationType CurrentOrientationType() const; | 32 blink::WebScreenOrientationType CurrentOrientationType() const; |
30 unsigned CurrentOrientationAngle() const; | 33 unsigned CurrentOrientationAngle() const; |
(...skipping 17 matching lines...) Expand all Loading... |
48 blink::WebScreenOrientationLockType current_lock_; | 51 blink::WebScreenOrientationLockType current_lock_; |
49 blink::WebScreenOrientationType device_orientation_; | 52 blink::WebScreenOrientationType device_orientation_; |
50 blink::WebScreenOrientationType current_orientation_; | 53 blink::WebScreenOrientationType current_orientation_; |
51 | 54 |
52 DISALLOW_COPY_AND_ASSIGN(MockScreenOrientationClient); | 55 DISALLOW_COPY_AND_ASSIGN(MockScreenOrientationClient); |
53 }; | 56 }; |
54 | 57 |
55 } // namespace test_runner | 58 } // namespace test_runner |
56 | 59 |
57 #endif // COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_ | 60 #endif // COMPONENTS_TEST_RUNNER_MOCK_SCREEN_ORIENTATION_CLIENT_H_ |
OLD | NEW |