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 // Use this file to assert that *_list.h enums that are meant to do the bridge | 5 // Use this file to assert that *_list.h enums that are meant to do the bridge |
6 // from Blink are valid. | 6 // from Blink are valid. |
7 | 7 |
8 #include "base/macros.h" | 8 #include "base/macros.h" |
9 #include "content/public/common/screen_orientation_values.h" | 9 #include "content/public/common/screen_orientation_values.h" |
10 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" | 10 #include "third_party/WebKit/public/platform/WebScreenOrientationLockType.h" |
11 | 11 |
12 namespace content { | 12 namespace content { |
13 | 13 |
14 #define COMPILE_ASSERT_MATCHING_ENUM(expected, actual) \ | 14 #define COMPILE_ASSERT_MATCHING_ENUM(expected, actual) \ |
15 COMPILE_ASSERT(int(expected) == int(actual), mismatching_enums) | 15 COMPILE_ASSERT(int(expected) == int(actual), mismatching_enums) |
16 | 16 |
| 17 // ScreenOrientationValues |
17 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockDefault, | 18 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockDefault, |
18 DEFAULT); | 19 DEFAULT); |
19 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitPrimary, | 20 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitPrimary, |
20 PORTRAIT_PRIMARY); | 21 PORTRAIT_PRIMARY); |
21 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitSecondary, | 22 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortraitSecondary, |
22 PORTRAIT_SECONDARY); | 23 PORTRAIT_SECONDARY); |
23 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapePrimary, | 24 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapePrimary, |
24 LANDSCAPE_PRIMARY); | 25 LANDSCAPE_PRIMARY); |
25 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapeSecondary, | 26 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscapeSecondary, |
26 LANDSCAPE_SECONDARY); | 27 LANDSCAPE_SECONDARY); |
27 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockAny, | 28 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockAny, |
28 ANY); | 29 ANY); |
29 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscape, | 30 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockLandscape, |
30 LANDSCAPE); | 31 LANDSCAPE); |
31 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortrait, | 32 COMPILE_ASSERT_MATCHING_ENUM(blink::WebScreenOrientationLockPortrait, |
32 PORTRAIT); | 33 PORTRAIT); |
33 | 34 |
| 35 // SupportsType |
| 36 COMPILE_ASSERT_MATCHING_ENUM(blink::IsNotSupported, IsNotSupported); |
| 37 COMPILE_ASSERT_MATCHING_ENUM(blink::IsSupported, IsSupported); |
| 38 COMPILE_ASSERT_MATCHING_ENUM(blink::MayBeSupported, MayBeSupported); |
| 39 |
34 } // namespace content | 40 } // namespace content |
OLD | NEW |