Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(581)

Unified Diff: mojo/converters/input_events/input_events_type_converters.cc

Issue 1559163002: Clean up event flags a bit: (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Review comment Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « mojo/converters/blink/blink_input_events_type_converters.cc ('k') | ui/aura/remote_window_tree_host_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/converters/input_events/input_events_type_converters.cc
diff --git a/mojo/converters/input_events/input_events_type_converters.cc b/mojo/converters/input_events/input_events_type_converters.cc
index bc17f8ae8f38aa076646dcf5b9e052cbf30902b2..3014670ea840d2060a69e9db2e5d6d490bfb6cc9 100644
--- a/mojo/converters/input_events/input_events_type_converters.cc
+++ b/mojo/converters/input_events/input_events_type_converters.cc
@@ -90,8 +90,8 @@ void SetPointerDataLocationFromEvent(const ui::LocatedEvent& located_event,
static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_NONE) ==
static_cast<int32_t>(ui::EF_NONE),
"EVENT_FLAGS must match");
-static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_CAPS_LOCK_DOWN) ==
- static_cast<int32_t>(ui::EF_CAPS_LOCK_DOWN),
+static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_IS_SYNTHESIZED) ==
+ static_cast<int32_t>(ui::EF_IS_SYNTHESIZED),
"EVENT_FLAGS must match");
static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_SHIFT_DOWN) ==
static_cast<int32_t>(ui::EF_SHIFT_DOWN),
@@ -102,6 +102,24 @@ static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_CONTROL_DOWN) ==
static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_ALT_DOWN) ==
static_cast<int32_t>(ui::EF_ALT_DOWN),
"EVENT_FLAGS must match");
+static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_COMMAND_DOWN) ==
+ static_cast<int32_t>(ui::EF_COMMAND_DOWN),
+ "EVENT_FLAGS must match");
+static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_ALTGR_DOWN) ==
+ static_cast<int32_t>(ui::EF_ALTGR_DOWN),
+ "EVENT_FLAGS must match");
+static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_MOD3_DOWN) ==
+ static_cast<int32_t>(ui::EF_MOD3_DOWN),
+ "EVENT_FLAGS must match");
+static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_NUM_LOCK_ON) ==
+ static_cast<int32_t>(ui::EF_NUM_LOCK_ON),
+ "EVENT_FLAGS must match");
+static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_CAPS_LOCK_ON) ==
+ static_cast<int32_t>(ui::EF_CAPS_LOCK_ON),
+ "EVENT_FLAGS must match");
+static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_SCROLL_LOCK_ON) ==
+ static_cast<int32_t>(ui::EF_SCROLL_LOCK_ON),
+ "EVENT_FLAGS must match");
static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_LEFT_MOUSE_BUTTON) ==
static_cast<int32_t>(ui::EF_LEFT_MOUSE_BUTTON),
"EVENT_FLAGS must match");
@@ -113,21 +131,13 @@ static_assert(
static_cast<int32_t>(mus::mojom::EVENT_FLAGS_RIGHT_MOUSE_BUTTON) ==
static_cast<int32_t>(ui::EF_RIGHT_MOUSE_BUTTON),
"EVENT_FLAGS must match");
-static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_COMMAND_DOWN) ==
- static_cast<int32_t>(ui::EF_COMMAND_DOWN),
- "EVENT_FLAGS must match");
-static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_EXTENDED) ==
- static_cast<int32_t>(ui::EF_EXTENDED),
- "EVENT_FLAGS must match");
-static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_IS_SYNTHESIZED) ==
- static_cast<int32_t>(ui::EF_IS_SYNTHESIZED),
- "EVENT_FLAGS must match");
-static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_ALTGR_DOWN) ==
- static_cast<int32_t>(ui::EF_ALTGR_DOWN),
- "EVENT_FLAGS must match");
-static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_MOD3_DOWN) ==
- static_cast<int32_t>(ui::EF_MOD3_DOWN),
+static_assert(static_cast<int32_t>(mus::mojom::EVENT_FLAGS_BACK_MOUSE_BUTTON) ==
+ static_cast<int32_t>(ui::EF_BACK_MOUSE_BUTTON),
"EVENT_FLAGS must match");
+static_assert(
+ static_cast<int32_t>(mus::mojom::EVENT_FLAGS_FORWARD_MOUSE_BUTTON) ==
+ static_cast<int32_t>(ui::EF_FORWARD_MOUSE_BUTTON),
+ "EVENT_FLAGS must match");
// static
mus::mojom::EventType
« no previous file with comments | « mojo/converters/blink/blink_input_events_type_converters.cc ('k') | ui/aura/remote_window_tree_host_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698