| 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/public/web/WebInputEvent.h" | 8 #include "third_party/WebKit/public/platform/WebInputEvent.h" |
| 9 | 9 |
| 10 namespace content { | 10 namespace content { |
| 11 | 11 |
| 12 MouseLockDispatcher::MouseLockDispatcher() : mouse_locked_(false), | 12 MouseLockDispatcher::MouseLockDispatcher() : mouse_locked_(false), |
| 13 pending_lock_request_(false), | 13 pending_lock_request_(false), |
| 14 pending_unlock_request_(false), | 14 pending_unlock_request_(false), |
| 15 unlocked_by_target_(false), | 15 unlocked_by_target_(false), |
| 16 target_(NULL) { | 16 target_(NULL) { |
| 17 } | 17 } |
| 18 | 18 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 target_ = NULL; | 97 target_ = NULL; |
| 98 | 98 |
| 99 // Callbacks made after all state modification to prevent reentrant errors | 99 // Callbacks made after all state modification to prevent reentrant errors |
| 100 // such as OnMouseLockLost() synchronously calling LockMouse(). | 100 // such as OnMouseLockLost() synchronously calling LockMouse(). |
| 101 | 101 |
| 102 if (last_target) | 102 if (last_target) |
| 103 last_target->OnMouseLockLost(); | 103 last_target->OnMouseLockLost(); |
| 104 } | 104 } |
| 105 | 105 |
| 106 } // namespace content | 106 } // namespace content |
| OLD | NEW |