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

Unified Diff: content/browser/renderer_host/input/web_input_event_util.cc

Issue 2234023002: Refactor WebInputEventAura to ui/events/blink (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 4 years, 4 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
Index: content/browser/renderer_host/input/web_input_event_util.cc
diff --git a/content/browser/renderer_host/input/web_input_event_util.cc b/content/browser/renderer_host/input/web_input_event_util.cc
deleted file mode 100644
index 9368a26a5dd959c68df0e19831eded489f3aae68..0000000000000000000000000000000000000000
--- a/content/browser/renderer_host/input/web_input_event_util.cc
+++ /dev/null
@@ -1,71 +0,0 @@
-// Copyright 2013 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// MSVC++ requires this to be set before any other includes to get M_PI.
-#define _USE_MATH_DEFINES
-
-#include "content/browser/renderer_host/input/web_input_event_util.h"
-
-#include <cmath>
-
-#include "base/strings/string_util.h"
-#include "content/common/input/web_touch_event_traits.h"
-#include "ui/events/blink/blink_event_util.h"
-#include "ui/events/event_constants.h"
-#include "ui/events/gesture_detection/gesture_event_data.h"
-#include "ui/events/keycodes/dom/keycode_converter.h"
-#include "ui/gfx/geometry/safe_integer_conversions.h"
-
-using blink::WebGestureEvent;
-using blink::WebInputEvent;
-using blink::WebTouchEvent;
-using blink::WebTouchPoint;
-
-namespace content {
-
-int WebEventModifiersToEventFlags(int modifiers) {
- int flags = 0;
-
- if (modifiers & blink::WebInputEvent::ShiftKey)
- flags |= ui::EF_SHIFT_DOWN;
- if (modifiers & blink::WebInputEvent::ControlKey)
- flags |= ui::EF_CONTROL_DOWN;
- if (modifiers & blink::WebInputEvent::AltKey)
- flags |= ui::EF_ALT_DOWN;
- if (modifiers & blink::WebInputEvent::MetaKey)
- flags |= ui::EF_COMMAND_DOWN;
- if (modifiers & blink::WebInputEvent::CapsLockOn)
- flags |= ui::EF_CAPS_LOCK_ON;
- if (modifiers & blink::WebInputEvent::NumLockOn)
- flags |= ui::EF_NUM_LOCK_ON;
- if (modifiers & blink::WebInputEvent::ScrollLockOn)
- flags |= ui::EF_SCROLL_LOCK_ON;
- if (modifiers & blink::WebInputEvent::LeftButtonDown)
- flags |= ui::EF_LEFT_MOUSE_BUTTON;
- if (modifiers & blink::WebInputEvent::MiddleButtonDown)
- flags |= ui::EF_MIDDLE_MOUSE_BUTTON;
- if (modifiers & blink::WebInputEvent::RightButtonDown)
- flags |= ui::EF_RIGHT_MOUSE_BUTTON;
- if (modifiers & blink::WebInputEvent::IsAutoRepeat)
- flags |= ui::EF_IS_REPEAT;
-
- return flags;
-}
-
-blink::WebInputEvent::Modifiers DomCodeToWebInputEventModifiers(
- ui::DomCode code) {
- switch (ui::KeycodeConverter::DomCodeToLocation(code)) {
- case ui::DomKeyLocation::LEFT:
- return blink::WebInputEvent::IsLeft;
- case ui::DomKeyLocation::RIGHT:
- return blink::WebInputEvent::IsRight;
- case ui::DomKeyLocation::NUMPAD:
- return blink::WebInputEvent::IsKeyPad;
- case ui::DomKeyLocation::STANDARD:
- break;
- }
- return static_cast<blink::WebInputEvent::Modifiers>(0);
-}
-
-} // namespace content

Powered by Google App Engine
This is Rietveld 408576698