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

Unified Diff: trunk/src/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc

Issue 306013003: Revert 273732 "Fix bustage, missed files" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: Created 6 years, 7 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: trunk/src/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc
===================================================================
--- trunk/src/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc (revision 273733)
+++ trunk/src/mojo/services/public/cpp/input_events/lib/input_events_type_converters.cc (working copy)
@@ -1,44 +0,0 @@
-// Copyright 2014 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.
-
-#include "mojo/services/public/cpp/input_events/input_events_type_converters.h"
-
-#include "mojo/services/public/cpp/geometry/geometry_type_converters.h"
-#include "ui/events/keycodes/keyboard_codes.h"
-
-namespace mojo {
-
-// static
-EventPtr TypeConverter<EventPtr, ui::Event>::ConvertFrom(
- const ui::Event& input) {
- EventPtr event(Event::New());
- event->action = input.type();
- event->flags = input.flags();
- event->time_stamp = input.time_stamp().ToInternalValue();
-
- if (input.IsMouseEvent() || input.IsTouchEvent()) {
- const ui::LocatedEvent* located_event =
- static_cast<const ui::LocatedEvent*>(&input);
- event->location =
- TypeConverter<PointPtr, gfx::Point>::ConvertFrom(
- located_event->location());
- }
-
- if (input.IsTouchEvent()) {
- const ui::TouchEvent* touch_event =
- static_cast<const ui::TouchEvent*>(&input);
- TouchDataPtr touch_data(TouchData::New());
- touch_data->pointer_id = touch_event->touch_id();
- event->touch_data = touch_data.Pass();
- } else if (input.IsKeyEvent()) {
- const ui::KeyEvent* key_event = static_cast<const ui::KeyEvent*>(&input);
- KeyDataPtr key_data(KeyData::New());
- key_data->key_code = key_event->key_code();
- key_data->is_char = key_event->is_char();
- event->key_data = key_data.Pass();
- }
- return event.Pass();
-}
-
-} // namespace mojo

Powered by Google App Engine
This is Rietveld 408576698