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

Unified Diff: ui/views/widget/widget.h

Issue 10479010: Gesture related changes for views: (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix test and add some mores Created 8 years, 6 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/widget/root_view.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/views/widget/widget.h
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index c754e950c3d6238234231ae67bf099554212219e..e0ab7bf097f3c7fca028092acba26b4d53c11382 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -566,11 +566,15 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
return native_widget_;
}
- // Sets mouse capture on the specified view.
- void SetMouseCapture(views::View* view);
+ // Sets capture to the specified view. This makes it so that all mouse, touch
+ // and gesture events go to |view|.
+ void SetCapture(views::View* view);
- // Releases mouse capture.
- void ReleaseMouseCapture();
+ // Releases capture.
+ void ReleaseCapture();
+
+ // Returns true if the widget has capture.
+ bool HasCapture();
// Returns the current event being processed. If there are multiple events
// being processed at the same time (e.g. one event triggers another event),
@@ -773,6 +777,9 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// If true, the mouse is currently down.
bool is_mouse_button_pressed_;
+ // If true, a touch device is currently down.
+ bool is_touch_down_;
+
// TODO(beng): Remove NativeWidgetGtk's dependence on these:
// The following are used to detect duplicate mouse move events and not
// deliver them. Displaying a window may result in the system generating
« no previous file with comments | « ui/views/widget/root_view.cc ('k') | ui/views/widget/widget.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698