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

Side by Side Diff: content/renderer/mouse_lock_dispatcher.h

Issue 10443045: Silent mouse lock after unlock by target (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 7 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CONTENT_RENDERER_MOUSE_LOCK_DISPATCHER_H_ 5 #ifndef CONTENT_RENDERER_MOUSE_LOCK_DISPATCHER_H_
6 #define CONTENT_RENDERER_MOUSE_LOCK_DISPATCHER_H_ 6 #define CONTENT_RENDERER_MOUSE_LOCK_DISPATCHER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "content/public/renderer/render_view_observer.h" 10 #include "content/public/renderer/render_view_observer.h"
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 RenderViewImpl* render_view_impl_; 69 RenderViewImpl* render_view_impl_;
70 70
71 bool mouse_locked_; 71 bool mouse_locked_;
72 // If both |pending_lock_request_| and |pending_unlock_request_| are true, 72 // If both |pending_lock_request_| and |pending_unlock_request_| are true,
73 // it means a lock request was sent before an unlock request and we haven't 73 // it means a lock request was sent before an unlock request and we haven't
74 // received responses for them. The logic in LockMouse() makes sure that a 74 // received responses for them. The logic in LockMouse() makes sure that a
75 // lock request won't be sent when there is a pending unlock request. 75 // lock request won't be sent when there is a pending unlock request.
76 bool pending_lock_request_; 76 bool pending_lock_request_;
77 bool pending_unlock_request_; 77 bool pending_unlock_request_;
78 78
79 bool unlocked_by_target_;
scheib 2012/05/26 01:12:34 We should comment. e.g. Used when locking to indic
dmurph 2012/05/30 00:17:51 Done.
80
79 // |target_| is the pending or current owner of mouse lock. We retain a non 81 // |target_| is the pending or current owner of mouse lock. We retain a non
80 // owning reference here that must be cleared by |OnLockTargetDestroyed| 82 // owning reference here that must be cleared by |OnLockTargetDestroyed|
81 // when it is destroyed. 83 // when it is destroyed.
82 LockTarget* target_; 84 LockTarget* target_;
83 85
84 DISALLOW_COPY_AND_ASSIGN(MouseLockDispatcher); 86 DISALLOW_COPY_AND_ASSIGN(MouseLockDispatcher);
85 }; 87 };
86 88
87 #endif // CONTENT_RENDERER_MOUSE_LOCK_DISPATCHER_H_ 89 #endif // CONTENT_RENDERER_MOUSE_LOCK_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698