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/render_view_mouse_lock_dispatcher.h" | 5 #include "content/renderer/render_view_mouse_lock_dispatcher.h" |
6 | 6 |
7 #include "content/common/view_messages.h" | 7 #include "content/common/view_messages.h" |
8 #include "content/renderer/render_view_impl.h" | 8 #include "content/renderer/render_view_impl.h" |
9 #include "third_party/WebKit/public/web/WebFrame.h" | 9 #include "third_party/WebKit/public/web/WebFrame.h" |
10 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" | 10 #include "third_party/WebKit/public/web/WebUserGestureIndicator.h" |
11 #include "third_party/WebKit/public/web/WebView.h" | 11 #include "third_party/WebKit/public/web/WebView.h" |
12 #include "third_party/WebKit/public/web/WebWidget.h" | 12 #include "third_party/WebKit/public/web/WebWidget.h" |
13 | 13 |
14 using WebKit::WebUserGestureIndicator; | 14 using blink::WebUserGestureIndicator; |
15 | 15 |
16 namespace content { | 16 namespace content { |
17 | 17 |
18 RenderViewMouseLockDispatcher::RenderViewMouseLockDispatcher( | 18 RenderViewMouseLockDispatcher::RenderViewMouseLockDispatcher( |
19 RenderViewImpl* render_view_impl) | 19 RenderViewImpl* render_view_impl) |
20 : RenderViewObserver(render_view_impl), | 20 : RenderViewObserver(render_view_impl), |
21 render_view_impl_(render_view_impl) { | 21 render_view_impl_(render_view_impl) { |
22 } | 22 } |
23 | 23 |
24 RenderViewMouseLockDispatcher::~RenderViewMouseLockDispatcher() { | 24 RenderViewMouseLockDispatcher::~RenderViewMouseLockDispatcher() { |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 // .movementX/Y values on events all sent to a fixed target. This requires | 57 // .movementX/Y values on events all sent to a fixed target. This requires |
58 // content to specifically request the mode to be entered. | 58 // content to specifically request the mode to be entered. |
59 // Mouse Capture is implicitly given for the duration of a drag event, and | 59 // Mouse Capture is implicitly given for the duration of a drag event, and |
60 // sends all mouse events to the initial target of the drag. | 60 // sends all mouse events to the initial target of the drag. |
61 // If Lock is entered it supercedes any in progress Capture. | 61 // If Lock is entered it supercedes any in progress Capture. |
62 if (succeeded && render_view_impl_->webwidget()) | 62 if (succeeded && render_view_impl_->webwidget()) |
63 render_view_impl_->webwidget()->mouseCaptureLost(); | 63 render_view_impl_->webwidget()->mouseCaptureLost(); |
64 } | 64 } |
65 | 65 |
66 } // namespace content | 66 } // namespace content |
OLD | NEW |