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

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: Update for silent mouse relock 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 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/common/mouse_lock.h"
10 #include "content/public/renderer/render_view_observer.h" 11 #include "content/public/renderer/render_view_observer.h"
11 12
12 class RenderViewImpl; 13 class RenderViewImpl;
13 14
14 namespace WebKit { 15 namespace WebKit {
15 class WebMouseEvent; 16 class WebMouseEvent;
16 class WebWidget; 17 class WebWidget;
17 } // namespace WebKit 18 } // namespace WebKit
18 19
19 namespace webkit{ 20 namespace webkit{
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
69 RenderViewImpl* render_view_impl_; 70 RenderViewImpl* render_view_impl_;
70 71
71 bool mouse_locked_; 72 bool mouse_locked_;
72 // If both |pending_lock_request_| and |pending_unlock_request_| are true, 73 // 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 74 // 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 75 // 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. 76 // lock request won't be sent when there is a pending unlock request.
76 bool pending_lock_request_; 77 bool pending_lock_request_;
77 bool pending_unlock_request_; 78 bool pending_unlock_request_;
78 79
80 // Used when locking to indicate when a target application has voluntarily
81 // unlocked and desires to relock the mouse. If the mouse is unlocked due
82 // to ESC being pressed by the user, this will NOT_TARGET
scheib 2012/05/30 16:41:21 s/will/will be/, and add a period.
83 content::MouseUnlockSource unlock_source_;
84
79 // |target_| is the pending or current owner of mouse lock. We retain a non 85 // |target_| is the pending or current owner of mouse lock. We retain a non
80 // owning reference here that must be cleared by |OnLockTargetDestroyed| 86 // owning reference here that must be cleared by |OnLockTargetDestroyed|
81 // when it is destroyed. 87 // when it is destroyed.
82 LockTarget* target_; 88 LockTarget* target_;
83 89
84 DISALLOW_COPY_AND_ASSIGN(MouseLockDispatcher); 90 DISALLOW_COPY_AND_ASSIGN(MouseLockDispatcher);
85 }; 91 };
86 92
87 #endif // CONTENT_RENDERER_MOUSE_LOCK_DISPATCHER_H_ 93 #endif // CONTENT_RENDERER_MOUSE_LOCK_DISPATCHER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698