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

Unified Diff: chrome/browser/chromeos/frame/panel_controller.cc

Issue 8914021: Remove remaining TOUCH_UI code under chromeos. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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 | « no previous file | chrome/browser/chromeos/legacy_window_manager/wm_message_listener.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/chromeos/frame/panel_controller.cc
diff --git a/chrome/browser/chromeos/frame/panel_controller.cc b/chrome/browser/chromeos/frame/panel_controller.cc
index 77179745e50489bb31491707f459added8234a50..08a2ef925f7abf144634c6cb5d6ef4c07fed32d5 100644
--- a/chrome/browser/chromeos/frame/panel_controller.cc
+++ b/chrome/browser/chromeos/frame/panel_controller.cc
@@ -4,11 +4,6 @@
#include "chrome/browser/chromeos/frame/panel_controller.h"
-#if defined(TOUCH_UI)
-#include <X11/Xlib.h>
-#include <X11/extensions/XInput2.h>
-#endif
-
#include <vector>
#include "base/logging.h"
@@ -40,39 +35,6 @@
#include "chrome/browser/chromeos/legacy_window_manager/wm_ipc.h"
#endif
-#if defined(TOUCH_UI)
-namespace {
-
-gfx::Point RootLocationFromXEvent(const XEvent* xev) {
- switch (xev->type) {
- case ButtonPress:
- case ButtonRelease:
- return gfx::Point(xev->xbutton.x_root, xev->xbutton.y_root);
- case MotionNotify:
- return gfx::Point(xev->xmotion.x_root, xev->xmotion.y_root);
-
- case GenericEvent: {
- const XIDeviceEvent* xiev =
- static_cast<XIDeviceEvent*>(xev->xcookie.data);
- switch (xiev->evtype) {
- case XI_ButtonPress:
- case XI_ButtonRelease:
- case XI_Motion:
- return gfx::Point(static_cast<int>(xiev->root_x),
- static_cast<int>(xiev->root_y));
- }
- }
-
- default:
- NOTREACHED();
- }
-
- return gfx::Point();
-}
-
-} // namespace
-#endif // defined(TOUCH_UI)
-
namespace chromeos {
static int close_button_width;
@@ -335,17 +297,10 @@ bool PanelController::TitleMouseDragged(const views::MouseEvent& event) {
return false;
}
-#if !defined(TOUCH_UI)
const GdkEvent* gdk_event = event.gdk_event();
GdkEventMotion last_motion_event = gdk_event->motion;
int x_root = last_motion_event.x_root;
int y_root = last_motion_event.y_root;
-#else
- const XEvent* xev = event.native_event();
- gfx::Point abs_location = RootLocationFromXEvent(xev);
- int x_root = abs_location.x();
- int y_root = abs_location.y();
-#endif
if (!dragging_) {
if (views::View::ExceededDragThreshold(x_root - mouse_down_abs_x_,
« no previous file with comments | « no previous file | chrome/browser/chromeos/legacy_window_manager/wm_message_listener.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698