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

Unified Diff: views/widget/native_widget_gtk.cc

Issue 7942004: Consolidate/cleanup event cracking code; single out GdkEvents. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: File permissions and aura fix. Created 9 years, 3 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
« ui/base/events.h ('K') | « views/views.gyp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: views/widget/native_widget_gtk.cc
diff --git a/views/widget/native_widget_gtk.cc b/views/widget/native_widget_gtk.cc
index b6a228055f56d16b8a04bfcacf7a384a1601c2fd..6989da986ed0d061e5dbff0c6d46fe8a49f53309 100644
--- a/views/widget/native_widget_gtk.cc
+++ b/views/widget/native_widget_gtk.cc
@@ -42,8 +42,8 @@
#include "views/window/hit_test.h"
#if defined(TOUCH_UI)
+#include "ui/base/touchui/touch_factory.h"
#include "views/widget/tooltip_manager_views.h"
-#include "views/touchui/touch_factory.h"
#else
#include "views/widget/tooltip_manager_gtk.h"
#endif
@@ -380,7 +380,7 @@ NativeWidgetGtk::NativeWidgetGtk(internal::NativeWidgetDelegate* delegate)
#if defined(TOUCH_UI)
// Make sure the touch factory is initialized so that it can setup XInput2 for
// the widget.
- TouchFactory::GetInstance();
+ ui::TouchFactory::GetInstance();
#endif
static bool installed_message_loop_observer = false;
if (!installed_message_loop_observer) {
@@ -926,7 +926,7 @@ void NativeWidgetGtk::SetMouseCapture() {
::Window window = GDK_WINDOW_XID(window_contents()->window);
Display* display = GDK_WINDOW_XDISPLAY(window_contents()->window);
bool xi2grab =
- TouchFactory::GetInstance()->GrabTouchDevices(display, window);
+ ui::TouchFactory::GetInstance()->GrabTouchDevices(display, window);
// xi2grab should always succeed if has_pointer_grab_ succeeded.
DCHECK(xi2grab);
has_pointer_grab_ = has_pointer_grab_ && xi2grab;
@@ -946,7 +946,7 @@ void NativeWidgetGtk::ReleaseMouseCapture() {
has_pointer_grab_ = false;
gdk_pointer_ungrab(GDK_CURRENT_TIME);
#if defined(TOUCH_UI)
- TouchFactory::GetInstance()->UngrabTouchDevices(
+ ui::TouchFactory::GetInstance()->UngrabTouchDevices(
GDK_WINDOW_XDISPLAY(window_contents()->window));
#endif
}
@@ -1310,9 +1310,9 @@ void NativeWidgetGtk::SchedulePaintInRect(const gfx::Rect& rect) {
void NativeWidgetGtk::SetCursor(gfx::NativeCursor cursor) {
#if defined(TOUCH_UI)
- if (TouchFactory::GetInstance()->keep_mouse_cursor())
+ if (ui::TouchFactory::GetInstance()->keep_mouse_cursor())
cursor = gfx::GetCursor(GDK_ARROW);
- else if (!TouchFactory::GetInstance()->is_cursor_visible())
+ else if (!ui::TouchFactory::GetInstance()->is_cursor_visible())
cursor = gfx::GetCursor(GDK_BLANK_CURSOR);
#endif
// |window_contents_| is placed on top of |widget_|. So the cursor needs to be
@@ -1751,7 +1751,7 @@ gboolean NativeWidgetGtk::OnGrabBrokeEvent(GtkWidget* widget, GdkEvent* event) {
ReleaseMouseCapture();
#if defined(HAVE_XINPUT2) && defined(TOUCH_UI)
- TouchFactory::GetInstance()->UngrabTouchDevices(
+ ui::TouchFactory::GetInstance()->UngrabTouchDevices(
GDK_WINDOW_XDISPLAY(window_contents()->window));
#endif
return false; // To let other widgets get the event.
« ui/base/events.h ('K') | « views/views.gyp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698