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

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

Issue 23533030: rAc: Enforce a 3 second grace period for generated card bubble. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: add a test Created 7 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
Index: ui/views/widget/widget.h
diff --git a/ui/views/widget/widget.h b/ui/views/widget/widget.h
index d8a32001a3b120cef3dda2d75e09dc611afd994d..0825f09621af24e5f2377adaab486d6aedb6afd2 100644
--- a/ui/views/widget/widget.h
+++ b/ui/views/widget/widget.h
@@ -631,7 +631,9 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
}
// Sets capture to the specified view. This makes it so that all mouse, touch
- // and gesture events go to |view|.
+ // and gesture events go to |view|. If |view| is NULL, the widget still
+ // obtains event capture, but the events will go to the view they'd normally
+ // go to.
void SetCapture(View* view);
// Releases capture.
@@ -640,6 +642,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
// Returns true if the widget has capture.
bool HasCapture();
+ void set_auto_release_capture(bool auto_release_capture) {
+ auto_release_capture_ = auto_release_capture;
+ }
+
// Invoked when the tooltip text changes for the specified views.
void TooltipTextChanged(View* view);
@@ -735,9 +741,6 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
friend class NativeTextfieldViewsTest;
friend class NativeComboboxViewsTest;
- // Returns whether capture should be released on mouse release.
- virtual bool ShouldReleaseCaptureOnMouseReleased() const;
-
// Sets the value of |disable_inactive_rendering_|. If the value changes,
// both the NonClientView and WidgetDelegate are notified.
void SetInactiveRenderingDisabled(bool value);
@@ -852,6 +855,10 @@ class VIEWS_EXPORT Widget : public internal::NativeWidgetDelegate,
bool last_mouse_event_was_move_;
gfx::Point last_mouse_event_position_;
+ // True if event capture should be released on a mouse up event. Default is
+ // true.
+ bool auto_release_capture_;
+
// See description in GetRootLayers().
std::vector<ui::Layer*> root_layers_;

Powered by Google App Engine
This is Rietveld 408576698