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

Unified Diff: ppapi/examples/mouse_lock/mouse_lock.cc

Issue 8072011: Only allow to lock the mouse when the tab is in fullscreen mode. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Make changes in response to review comments & sync. 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
« no previous file with comments | « content/browser/tab_contents/tab_contents_delegate.cc ('k') | ppapi/examples/mouse_lock/mouse_lock.html » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/examples/mouse_lock/mouse_lock.cc
diff --git a/ppapi/examples/mouse_lock/mouse_lock.cc b/ppapi/examples/mouse_lock/mouse_lock.cc
index 95806cf5046505b63a18924eefd49957c9966c42..0b86a4b188d7aceaceedabef8eef6f4dd37c0872 100644
--- a/ppapi/examples/mouse_lock/mouse_lock.cc
+++ b/ppapi/examples/mouse_lock/mouse_lock.cc
@@ -53,8 +53,9 @@ class MyInstance : public pp::Instance, public pp::MouseLock_Dev {
!mouse_locked_) {
LockMouse(
callback_factory_.NewRequiredCallback(&MyInstance::DidLockMouse));
- } else if (mouse_event.GetButton() == PP_INPUTEVENT_MOUSEBUTTON_RIGHT &&
- mouse_locked_) {
+ } else if (
+ mouse_event.GetButton() == PP_INPUTEVENT_MOUSEBUTTON_MIDDLE &&
+ mouse_locked_) {
UnlockMouse();
}
return true;
« no previous file with comments | « content/browser/tab_contents/tab_contents_delegate.cc ('k') | ppapi/examples/mouse_lock/mouse_lock.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698