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