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 #include "content/renderer/mouse_lock_dispatcher.h" | 5 #include "content/renderer/mouse_lock_dispatcher.h" |
6 | 6 |
7 #include "base/logging.h" | 7 #include "base/logging.h" |
8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" | 8 #include "third_party/WebKit/Source/WebKit/chromium/public/WebInputEvent.h" |
9 | 9 |
| 10 namespace content { |
| 11 |
10 MouseLockDispatcher::MouseLockDispatcher() : mouse_locked_(false), | 12 MouseLockDispatcher::MouseLockDispatcher() : mouse_locked_(false), |
11 pending_lock_request_(false), | 13 pending_lock_request_(false), |
12 pending_unlock_request_(false), | 14 pending_unlock_request_(false), |
13 unlocked_by_target_(false), | 15 unlocked_by_target_(false), |
14 target_(NULL) { | 16 target_(NULL) { |
15 } | 17 } |
16 | 18 |
17 MouseLockDispatcher::~MouseLockDispatcher() { | 19 MouseLockDispatcher::~MouseLockDispatcher() { |
18 } | 20 } |
19 | 21 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
93 | 95 |
94 LockTarget* last_target = target_; | 96 LockTarget* last_target = target_; |
95 target_ = NULL; | 97 target_ = NULL; |
96 | 98 |
97 // Callbacks made after all state modification to prevent reentrant errors | 99 // Callbacks made after all state modification to prevent reentrant errors |
98 // such as OnMouseLockLost() synchronously calling LockMouse(). | 100 // such as OnMouseLockLost() synchronously calling LockMouse(). |
99 | 101 |
100 if (last_target) | 102 if (last_target) |
101 last_target->OnMouseLockLost(); | 103 last_target->OnMouseLockLost(); |
102 } | 104 } |
| 105 |
| 106 } // namespace content |
OLD | NEW |