OLD | NEW |
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 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "content/common/content_export.h" | 9 #include "content/common/content_export.h" |
10 | 10 |
11 namespace WebKit { | 11 namespace WebKit { |
12 class WebMouseEvent; | 12 class WebMouseEvent; |
13 } // namespace WebKit | 13 } // namespace WebKit |
14 | 14 |
| 15 namespace content { |
| 16 |
15 class CONTENT_EXPORT MouseLockDispatcher { | 17 class CONTENT_EXPORT MouseLockDispatcher { |
16 public: | 18 public: |
17 MouseLockDispatcher(); | 19 MouseLockDispatcher(); |
18 virtual ~MouseLockDispatcher(); | 20 virtual ~MouseLockDispatcher(); |
19 | 21 |
20 class LockTarget { | 22 class LockTarget { |
21 public: | 23 public: |
22 virtual ~LockTarget() {} | 24 virtual ~LockTarget() {} |
23 // A mouse lock request was pending and this reports success or failure. | 25 // A mouse lock request was pending and this reports success or failure. |
24 virtual void OnLockMouseACK(bool succeeded) = 0; | 26 virtual void OnLockMouseACK(bool succeeded) = 0; |
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 bool unlocked_by_target_; | 75 bool unlocked_by_target_; |
74 | 76 |
75 // |target_| is the pending or current owner of mouse lock. We retain a non | 77 // |target_| is the pending or current owner of mouse lock. We retain a non |
76 // owning reference here that must be cleared by |OnLockTargetDestroyed| | 78 // owning reference here that must be cleared by |OnLockTargetDestroyed| |
77 // when it is destroyed. | 79 // when it is destroyed. |
78 LockTarget* target_; | 80 LockTarget* target_; |
79 | 81 |
80 DISALLOW_COPY_AND_ASSIGN(MouseLockDispatcher); | 82 DISALLOW_COPY_AND_ASSIGN(MouseLockDispatcher); |
81 }; | 83 }; |
82 | 84 |
| 85 } // namespace content |
| 86 |
83 #endif // CONTENT_RENDERER_MOUSE_LOCK_DISPATCHER_H_ | 87 #endif // CONTENT_RENDERER_MOUSE_LOCK_DISPATCHER_H_ |
OLD | NEW |