diff options
author | tdresser@chromium.org <tdresser@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-11 13:50:14 +0000 |
---|---|---|
committer | tdresser@chromium.org <tdresser@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-04-11 13:50:14 +0000 |
commit | caf99866fa13ab0321d38aaed8c1e7e4759e2f69 (patch) | |
tree | 1a8e38604162b28ee03294f674b7b06b79113b3c /content | |
parent | 5db9adad6560d8097712114ebee730be072d97f9 (diff) | |
download | chromium_src-caf99866fa13ab0321d38aaed8c1e7e4759e2f69.zip chromium_src-caf99866fa13ab0321d38aaed8c1e7e4759e2f69.tar.gz chromium_src-caf99866fa13ab0321d38aaed8c1e7e4759e2f69.tar.bz2 |
Mouse events, touch events, or both can be locked to a target.
NativeWidgetPrivate and Window event capture related commands now take a
set of flags, indicating what event types to lock. Current options are
CW_LOCK_MOUSE and CW_LOCK_TOUCH.
BUG=117554
TEST=WindowTest.TouchCaptureTests, WindowTest.CaptureTests
Review URL: http://codereview.chromium.org/9838011
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131761 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content')
-rw-r--r-- | content/browser/renderer_host/render_widget_host_view_aura.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc index 89c1d03..c375a2a 100644 --- a/content/browser/renderer_host/render_widget_host_view_aura.cc +++ b/content/browser/renderer_host/render_widget_host_view_aura.cc @@ -686,7 +686,7 @@ bool RenderWidgetHostViewAura::LockMouse() { mouse_locked_ = true; - root_window->SetCapture(window_); + root_window->SetCapture(window_, ui::CW_LOCK_MOUSE); if (root_window->ConfineCursorToWindow()) { root_window->ShowCursor(false); synthetic_move_sent_ = true; @@ -1018,7 +1018,7 @@ bool RenderWidgetHostViewAura::OnMouseEvent(aura::MouseEvent* event) { switch (event->type()) { case ui::ET_MOUSE_PRESSED: - window_->SetCapture(); + window_->SetCapture(ui::CW_LOCK_MOUSE); // Confirm existing composition text on mouse click events, to make sure // the input caret won't be moved with an ongoing composition text. FinishImeCompositionSession(); |