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

Unified Diff: ui/views/events/event_x.cc

Issue 10824295: Rid the world of the last of views::Event types: TouchEvent, GestureEvent, MouseWheelEvent, ScrollE… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 8 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
« no previous file with comments | « ui/views/events/event_win.cc ('k') | ui/views/focus/accelerator_handler_win.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/events/event_x.cc
===================================================================
--- ui/views/events/event_x.cc (revision 151481)
+++ ui/views/events/event_x.cc (working copy)
@@ -1,57 +0,0 @@
-// Copyright (c) 2012 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 "ui/views/events/event.h"
-
-#include <gdk/gdk.h>
-#include <gdk/gdkx.h>
-#include <X11/extensions/XInput2.h>
-#include <X11/Xlib.h>
-
-#include "base/logging.h"
-#include "base/utf_string_conversions.h"
-#include "ui/base/events.h"
-#include "ui/base/keycodes/keyboard_code_conversion.h"
-#include "ui/base/keycodes/keyboard_code_conversion_x.h"
-#include "ui/base/touch/touch_factory.h"
-#include "ui/views/widget/root_view.h"
-
-namespace views {
-
-////////////////////////////////////////////////////////////////////////////////
-// TouchEvent, public:
-
-TouchEvent::TouchEvent(const base::NativeEvent& native_event)
- : LocatedEvent(native_event),
- touch_id_(ui::GetTouchId(native_event)),
- radius_x_(ui::GetTouchRadiusX(native_event)),
- radius_y_(ui::GetTouchRadiusY(native_event)),
- rotation_angle_(ui::GetTouchAngle(native_event)),
- force_(ui::GetTouchForce(native_event)) {
-#if defined(USE_XI2_MT)
- if (type() == ui::ET_TOUCH_RELEASED) {
- // NOTE: The slot is allocated by TouchFactory for each XI_TouchBegin
- // event, which carries a new tracking ID to identify a new touch
- // sequence.
- ui::TouchFactory* factory = ui::TouchFactory::GetInstance();
- float tracking_id;
- if (factory->ExtractTouchParam(*native_event,
- ui::TouchFactory::TP_TRACKING_ID,
- &tracking_id)) {
- factory->ReleaseSlotForTrackingID(tracking_id);
- }
- }
-#else
- if (type() == ui::ET_TOUCH_PRESSED || type() == ui::ET_TOUCH_RELEASED) {
- ui::TouchFactory* factory = ui::TouchFactory::GetInstance();
- float slot;
- if (factory->ExtractTouchParam(*native_event,
- ui::TouchFactory::TP_SLOT_ID, &slot)) {
- factory->SetSlotUsed(slot, type() == ui::ET_TOUCH_PRESSED);
- }
- }
-#endif
-}
-
-} // namespace views
« no previous file with comments | « ui/views/events/event_win.cc ('k') | ui/views/focus/accelerator_handler_win.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698