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

Unified Diff: ui/base/x/events_x.cc

Issue 9969080: Remove TOOLKIT_USES_GTK (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add gtk dependency to android linux host Created 8 years, 9 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/base/resource/resource_bundle.h ('k') | ui/base/x/x11_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/base/x/events_x.cc
diff --git a/ui/base/x/events_x.cc b/ui/base/x/events_x.cc
index d29a152f2203488c9cd1d09d41751fd534ea9a55..8bb5aebd43616bb819d533db4efb9da42927cc3b 100644
--- a/ui/base/x/events_x.cc
+++ b/ui/base/x/events_x.cc
@@ -10,15 +10,12 @@
#include <string.h>
#include "base/logging.h"
+#include "base/message_pump_x.h"
#include "ui/base/keycodes/keyboard_code_conversion_x.h"
#include "ui/base/touch/touch_factory.h"
#include "ui/base/x/x11_util.h"
#include "ui/gfx/point.h"
-#if !defined(TOOLKIT_USES_GTK)
-#include "base/message_pump_x.h"
-#endif
-
// Copied from xserver-properties.h
#define AXIS_LABEL_PROP_REL_HWHEEL "Rel Horiz Wheel"
#define AXIS_LABEL_PROP_REL_WHEEL "Rel Vert Wheel"
@@ -508,13 +505,11 @@ float GetTouchParamFromXEvent(XEvent* xev,
return default_value;
}
-#if !defined(TOOLKIT_USES_GTK)
Atom GetNoopEventAtom() {
return XInternAtom(
base::MessagePumpX::GetDefaultXDisplay(),
"noop", False);
}
-#endif
} // namespace
@@ -864,13 +859,8 @@ void UpdateDeviceList() {
}
bool IsNoopEvent(const base::NativeEvent& event) {
-#if defined(TOOLKIT_USES_GTK)
- NOTREACHED();
- return false;
-#else
return (event->type == ClientMessage &&
event->xclient.message_type == GetNoopEventAtom());
-#endif
}
base::NativeEvent CreateNoopEvent() {
@@ -883,14 +873,9 @@ base::NativeEvent CreateNoopEvent() {
noop->xclient.format = 8;
DCHECK(!noop->xclient.display);
}
- // TODO(oshima): Remove ifdef once gtk is removed from views.
-#if defined(TOOLKIT_USES_GTK)
- NOTREACHED();
-#else
// Make sure we use atom from current xdisplay, which may
// change during the test.
noop->xclient.message_type = GetNoopEventAtom();
-#endif
return noop;
}
« no previous file with comments | « ui/base/resource/resource_bundle.h ('k') | ui/base/x/x11_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698