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_impl.h" | 5 #include "content/renderer/render_view_impl.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 #include <cmath> | 8 #include <cmath> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 4208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4219 const std::string& value) { | 4219 const std::string& value) { |
4220 if (enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) | 4220 if (enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) |
4221 GetWebUIBindings()->SetProperty(name, value); | 4221 GetWebUIBindings()->SetProperty(name, value); |
4222 else | 4222 else |
4223 NOTREACHED() << "WebUI bindings not enabled."; | 4223 NOTREACHED() << "WebUI bindings not enabled."; |
4224 } | 4224 } |
4225 | 4225 |
4226 void RenderViewImpl::OnDragTargetDragEnter(const WebDropData& drop_data, | 4226 void RenderViewImpl::OnDragTargetDragEnter(const WebDropData& drop_data, |
4227 const gfx::Point& client_point, | 4227 const gfx::Point& client_point, |
4228 const gfx::Point& screen_point, | 4228 const gfx::Point& screen_point, |
4229 WebDragOperationsMask ops) { | 4229 WebDragOperationsMask ops, |
| 4230 int key_modifiers) { |
4230 WebDragOperation operation = webview()->dragTargetDragEnter( | 4231 WebDragOperation operation = webview()->dragTargetDragEnter( |
4231 drop_data.ToDragData(), | 4232 drop_data.ToDragData(), |
4232 client_point, | 4233 client_point, |
4233 screen_point, | 4234 screen_point, |
4234 ops); | 4235 ops, |
| 4236 key_modifiers); |
4235 | 4237 |
4236 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); | 4238 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); |
4237 } | 4239 } |
4238 | 4240 |
4239 void RenderViewImpl::OnDragTargetDragOver(const gfx::Point& client_point, | 4241 void RenderViewImpl::OnDragTargetDragOver(const gfx::Point& client_point, |
4240 const gfx::Point& screen_point, | 4242 const gfx::Point& screen_point, |
4241 WebDragOperationsMask ops) { | 4243 WebDragOperationsMask ops, |
| 4244 int key_modifiers) { |
4242 WebDragOperation operation = webview()->dragTargetDragOver( | 4245 WebDragOperation operation = webview()->dragTargetDragOver( |
4243 client_point, | 4246 client_point, |
4244 screen_point, | 4247 screen_point, |
4245 ops); | 4248 ops, |
| 4249 key_modifiers); |
4246 | 4250 |
4247 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); | 4251 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); |
4248 } | 4252 } |
4249 | 4253 |
4250 void RenderViewImpl::OnDragTargetDragLeave() { | 4254 void RenderViewImpl::OnDragTargetDragLeave() { |
4251 webview()->dragTargetDragLeave(); | 4255 webview()->dragTargetDragLeave(); |
4252 } | 4256 } |
4253 | 4257 |
4254 void RenderViewImpl::OnDragTargetDrop(const gfx::Point& client_point, | 4258 void RenderViewImpl::OnDragTargetDrop(const gfx::Point& client_point, |
4255 const gfx::Point& screen_point) { | 4259 const gfx::Point& screen_point, |
4256 webview()->dragTargetDrop(client_point, screen_point); | 4260 int key_modifiers) { |
| 4261 webview()->dragTargetDrop(client_point, screen_point, key_modifiers); |
4257 | 4262 |
4258 Send(new DragHostMsg_TargetDrop_ACK(routing_id_)); | 4263 Send(new DragHostMsg_TargetDrop_ACK(routing_id_)); |
4259 } | 4264 } |
4260 | 4265 |
4261 void RenderViewImpl::OnDragSourceEndedOrMoved(const gfx::Point& client_point, | 4266 void RenderViewImpl::OnDragSourceEndedOrMoved(const gfx::Point& client_point, |
4262 const gfx::Point& screen_point, | 4267 const gfx::Point& screen_point, |
4263 bool ended, | 4268 bool ended, |
4264 WebDragOperation op) { | 4269 WebDragOperation op) { |
4265 if (ended) { | 4270 if (ended) { |
4266 webview()->dragSourceEndedAt(client_point, screen_point, op); | 4271 webview()->dragSourceEndedAt(client_point, screen_point, op); |
(...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5311 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { | 5316 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { |
5312 return !!RenderThreadImpl::current()->compositor_thread(); | 5317 return !!RenderThreadImpl::current()->compositor_thread(); |
5313 } | 5318 } |
5314 | 5319 |
5315 void RenderViewImpl::OnJavaBridgeInit() { | 5320 void RenderViewImpl::OnJavaBridgeInit() { |
5316 DCHECK(!java_bridge_dispatcher_.get()); | 5321 DCHECK(!java_bridge_dispatcher_.get()); |
5317 #if defined(ENABLE_JAVA_BRIDGE) | 5322 #if defined(ENABLE_JAVA_BRIDGE) |
5318 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); | 5323 java_bridge_dispatcher_.reset(new JavaBridgeDispatcher(this)); |
5319 #endif | 5324 #endif |
5320 } | 5325 } |
OLD | NEW |