Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(197)

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 10377119: Plumb event flags (shift/alt/ctrl modifiers) for drag/drop events to WebKit. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: patch Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
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 4277 matching lines...) Expand 10 before | Expand all | Expand 10 after
4288 const std::string& value) { 4288 const std::string& value) {
4289 if (enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) 4289 if (enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI)
4290 GetWebUIBindings()->SetProperty(name, value); 4290 GetWebUIBindings()->SetProperty(name, value);
4291 else 4291 else
4292 NOTREACHED() << "WebUI bindings not enabled."; 4292 NOTREACHED() << "WebUI bindings not enabled.";
4293 } 4293 }
4294 4294
4295 void RenderViewImpl::OnDragTargetDragEnter(const WebDropData& drop_data, 4295 void RenderViewImpl::OnDragTargetDragEnter(const WebDropData& drop_data,
4296 const gfx::Point& client_point, 4296 const gfx::Point& client_point,
4297 const gfx::Point& screen_point, 4297 const gfx::Point& screen_point,
4298 WebDragOperationsMask ops) { 4298 WebDragOperationsMask ops,
4299 int key_modifiers) {
4299 WebDragOperation operation = webview()->dragTargetDragEnter( 4300 WebDragOperation operation = webview()->dragTargetDragEnter(
4300 drop_data.ToDragData(), 4301 drop_data.ToDragData(),
4301 client_point, 4302 client_point,
4302 screen_point, 4303 screen_point,
4303 ops); 4304 ops,
4305 key_modifiers);
4304 4306
4305 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); 4307 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation));
4306 } 4308 }
4307 4309
4308 void RenderViewImpl::OnDragTargetDragOver(const gfx::Point& client_point, 4310 void RenderViewImpl::OnDragTargetDragOver(const gfx::Point& client_point,
4309 const gfx::Point& screen_point, 4311 const gfx::Point& screen_point,
4310 WebDragOperationsMask ops) { 4312 WebDragOperationsMask ops,
4313 int key_modifiers) {
4311 WebDragOperation operation = webview()->dragTargetDragOver( 4314 WebDragOperation operation = webview()->dragTargetDragOver(
4312 client_point, 4315 client_point,
4313 screen_point, 4316 screen_point,
4314 ops); 4317 ops,
4318 key_modifiers);
4315 4319
4316 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); 4320 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation));
4317 } 4321 }
4318 4322
4319 void RenderViewImpl::OnDragTargetDragLeave() { 4323 void RenderViewImpl::OnDragTargetDragLeave() {
4320 webview()->dragTargetDragLeave(); 4324 webview()->dragTargetDragLeave();
4321 } 4325 }
4322 4326
4323 void RenderViewImpl::OnDragTargetDrop(const gfx::Point& client_point, 4327 void RenderViewImpl::OnDragTargetDrop(const gfx::Point& client_point,
4324 const gfx::Point& screen_point) { 4328 const gfx::Point& screen_point,
4325 webview()->dragTargetDrop(client_point, screen_point); 4329 int key_modifiers) {
4330 webview()->dragTargetDrop(client_point, screen_point, key_modifiers);
4326 4331
4327 Send(new DragHostMsg_TargetDrop_ACK(routing_id_)); 4332 Send(new DragHostMsg_TargetDrop_ACK(routing_id_));
4328 } 4333 }
4329 4334
4330 void RenderViewImpl::OnDragSourceEndedOrMoved(const gfx::Point& client_point, 4335 void RenderViewImpl::OnDragSourceEndedOrMoved(const gfx::Point& client_point,
4331 const gfx::Point& screen_point, 4336 const gfx::Point& screen_point,
4332 bool ended, 4337 bool ended,
4333 WebDragOperation op) { 4338 WebDragOperation op) {
4334 if (ended) { 4339 if (ended) {
4335 webview()->dragSourceEndedAt(client_point, screen_point, op); 4340 webview()->dragSourceEndedAt(client_point, screen_point, op);
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
5391 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5396 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5392 return !!RenderThreadImpl::current()->compositor_thread(); 5397 return !!RenderThreadImpl::current()->compositor_thread();
5393 } 5398 }
5394 5399
5395 void RenderViewImpl::OnJavaBridgeInit() { 5400 void RenderViewImpl::OnJavaBridgeInit() {
5396 DCHECK(!java_bridge_dispatcher_); 5401 DCHECK(!java_bridge_dispatcher_);
5397 #if defined(ENABLE_JAVA_BRIDGE) 5402 #if defined(ENABLE_JAVA_BRIDGE)
5398 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5403 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5399 #endif 5404 #endif
5400 } 5405 }
OLDNEW
« content/browser/web_contents/web_drag_dest_win.cc ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698