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 "media/base/mime_util.h" | 10 #include "media/base/mime_util.h" |
11 #include "third_party/WebKit/public/platform/WebTextInputMode.h" | 11 #include "third_party/WebKit/public/platform/WebTextInputMode.h" |
12 #include "third_party/WebKit/public/platform/WebTextInputType.h" | 12 #include "third_party/WebKit/public/platform/WebTextInputType.h" |
13 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationLockType.h" | 13 #include "third_party/WebKit/public/platform/modules/screen_orientation/WebScree
nOrientationLockType.h" |
14 #include "third_party/WebKit/public/web/WebFrameSerializerCacheControlPolicy.h" | 14 #include "third_party/WebKit/public/web/WebFrameSerializerCacheControlPolicy.h" |
| 15 #include "third_party/WebKit/public/web/WebMenuSourceType.h" |
15 #include "ui/base/ime/text_input_mode.h" | 16 #include "ui/base/ime/text_input_mode.h" |
16 #include "ui/base/ime/text_input_type.h" | 17 #include "ui/base/ime/text_input_type.h" |
| 18 #include "ui/base/ui_base_types.h" |
17 | 19 |
18 namespace content { | 20 namespace content { |
19 | 21 |
20 #define STATIC_ASSERT_ENUM(a, b) \ | 22 #define STATIC_ASSERT_ENUM(a, b) \ |
21 static_assert(static_cast<int>(a) == static_cast<int>(b), \ | 23 static_assert(static_cast<int>(a) == static_cast<int>(b), \ |
22 "mismatching enums: " #a) | 24 "mismatching enums: " #a) |
23 | 25 |
24 // ScreenOrientationValues | 26 // ScreenOrientationValues |
25 STATIC_ASSERT_ENUM(blink::kWebScreenOrientationLockDefault, | 27 STATIC_ASSERT_ENUM(blink::kWebScreenOrientationLockDefault, |
26 SCREEN_ORIENTATION_VALUES_DEFAULT); | 28 SCREEN_ORIENTATION_VALUES_DEFAULT); |
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeMonth, ui::TEXT_INPUT_TYPE_MONTH); | 83 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeMonth, ui::TEXT_INPUT_TYPE_MONTH); |
82 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeTime, ui::TEXT_INPUT_TYPE_TIME); | 84 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeTime, ui::TEXT_INPUT_TYPE_TIME); |
83 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeWeek, ui::TEXT_INPUT_TYPE_WEEK); | 85 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeWeek, ui::TEXT_INPUT_TYPE_WEEK); |
84 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeTextArea, | 86 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeTextArea, |
85 ui::TEXT_INPUT_TYPE_TEXT_AREA); | 87 ui::TEXT_INPUT_TYPE_TEXT_AREA); |
86 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeContentEditable, | 88 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeContentEditable, |
87 ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE); | 89 ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE); |
88 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeDateTimeField, | 90 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeDateTimeField, |
89 ui::TEXT_INPUT_TYPE_DATE_TIME_FIELD); | 91 ui::TEXT_INPUT_TYPE_DATE_TIME_FIELD); |
90 | 92 |
| 93 // WebMenuSourceType |
| 94 STATIC_ASSERT_ENUM(blink::kMenuSourceNone, ui::MENU_SOURCE_NONE); |
| 95 STATIC_ASSERT_ENUM(blink::kMenuSourceMouse, ui::MENU_SOURCE_MOUSE); |
| 96 STATIC_ASSERT_ENUM(blink::kMenuSourceKeyboard, ui::MENU_SOURCE_KEYBOARD); |
| 97 STATIC_ASSERT_ENUM(blink::kMenuSourceTouch, ui::MENU_SOURCE_TOUCH); |
| 98 STATIC_ASSERT_ENUM(blink::kMenuSourceTouchEditMenu, |
| 99 ui::MENU_SOURCE_TOUCH_EDIT_MENU); |
| 100 STATIC_ASSERT_ENUM(blink::kMenuSourceLongPress, ui::MENU_SOURCE_LONG_PRESS); |
| 101 STATIC_ASSERT_ENUM(blink::kMenuSourceLongTap, ui::MENU_SOURCE_LONG_TAP); |
| 102 STATIC_ASSERT_ENUM(blink::kMenuSourceTouchHandle, ui::MENU_SOURCE_TOUCH_HANDLE); |
| 103 |
91 } // namespace content | 104 } // namespace content |
OLD | NEW |