| 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/common/input/touch_action.h" | |
| 10 #include "content/public/common/screen_orientation_values.h" | 9 #include "content/public/common/screen_orientation_values.h" |
| 11 #include "media/base/mime_util.h" | 10 #include "media/base/mime_util.h" |
| 12 #include "third_party/WebKit/public/platform/WebTextInputMode.h" | 11 #include "third_party/WebKit/public/platform/WebTextInputMode.h" |
| 13 #include "third_party/WebKit/public/platform/WebTextInputType.h" | 12 #include "third_party/WebKit/public/platform/WebTextInputType.h" |
| 14 #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" |
| 15 #include "third_party/WebKit/public/web/WebFrameSerializerCacheControlPolicy.h" | 14 #include "third_party/WebKit/public/web/WebFrameSerializerCacheControlPolicy.h" |
| 16 #include "third_party/WebKit/public/web/WebTouchAction.h" | |
| 17 #include "ui/base/ime/text_input_mode.h" | 15 #include "ui/base/ime/text_input_mode.h" |
| 18 #include "ui/base/ime/text_input_type.h" | 16 #include "ui/base/ime/text_input_type.h" |
| 19 | 17 |
| 20 namespace content { | 18 namespace content { |
| 21 | 19 |
| 22 #define STATIC_ASSERT_ENUM(a, b) \ | 20 #define STATIC_ASSERT_ENUM(a, b) \ |
| 23 static_assert(static_cast<int>(a) == static_cast<int>(b), \ | 21 static_assert(static_cast<int>(a) == static_cast<int>(b), \ |
| 24 "mismatching enums: " #a) | 22 "mismatching enums: " #a) |
| 25 | 23 |
| 26 // ScreenOrientationValues | 24 // ScreenOrientationValues |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 83 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeMonth, ui::TEXT_INPUT_TYPE_MONTH); | 81 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeMonth, ui::TEXT_INPUT_TYPE_MONTH); |
| 84 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeTime, ui::TEXT_INPUT_TYPE_TIME); | 82 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeTime, ui::TEXT_INPUT_TYPE_TIME); |
| 85 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeWeek, ui::TEXT_INPUT_TYPE_WEEK); | 83 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeWeek, ui::TEXT_INPUT_TYPE_WEEK); |
| 86 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeTextArea, | 84 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeTextArea, |
| 87 ui::TEXT_INPUT_TYPE_TEXT_AREA); | 85 ui::TEXT_INPUT_TYPE_TEXT_AREA); |
| 88 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeContentEditable, | 86 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeContentEditable, |
| 89 ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE); | 87 ui::TEXT_INPUT_TYPE_CONTENT_EDITABLE); |
| 90 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeDateTimeField, | 88 STATIC_ASSERT_ENUM(blink::kWebTextInputTypeDateTimeField, |
| 91 ui::TEXT_INPUT_TYPE_DATE_TIME_FIELD); | 89 ui::TEXT_INPUT_TYPE_DATE_TIME_FIELD); |
| 92 | 90 |
| 93 // Check blink::WebTouchAction and content::TouchAction is kept in sync. | |
| 94 STATIC_ASSERT_ENUM(blink::kWebTouchActionNone, TOUCH_ACTION_NONE); | |
| 95 STATIC_ASSERT_ENUM(blink::kWebTouchActionPanLeft, TOUCH_ACTION_PAN_LEFT); | |
| 96 STATIC_ASSERT_ENUM(blink::kWebTouchActionPanRight, TOUCH_ACTION_PAN_RIGHT); | |
| 97 STATIC_ASSERT_ENUM(blink::kWebTouchActionPanX, TOUCH_ACTION_PAN_X); | |
| 98 STATIC_ASSERT_ENUM(blink::kWebTouchActionPanUp, TOUCH_ACTION_PAN_UP); | |
| 99 STATIC_ASSERT_ENUM(blink::kWebTouchActionPanDown, TOUCH_ACTION_PAN_DOWN); | |
| 100 STATIC_ASSERT_ENUM(blink::kWebTouchActionPanY, TOUCH_ACTION_PAN_Y); | |
| 101 STATIC_ASSERT_ENUM(blink::kWebTouchActionPan, TOUCH_ACTION_PAN); | |
| 102 STATIC_ASSERT_ENUM(blink::kWebTouchActionPinchZoom, TOUCH_ACTION_PINCH_ZOOM); | |
| 103 STATIC_ASSERT_ENUM(blink::kWebTouchActionManipulation, | |
| 104 TOUCH_ACTION_MANIPULATION); | |
| 105 STATIC_ASSERT_ENUM(blink::kWebTouchActionDoubleTapZoom, | |
| 106 TOUCH_ACTION_DOUBLE_TAP_ZOOM); | |
| 107 STATIC_ASSERT_ENUM(blink::kWebTouchActionAuto, TOUCH_ACTION_AUTO); | |
| 108 | |
| 109 } // namespace content | 91 } // namespace content |
| OLD | NEW |