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

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: fixed compile error 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
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 4276 matching lines...) Expand 10 before | Expand all | Expand 10 after
4287 const std::string& value) { 4287 const std::string& value) {
4288 if (enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI) 4288 if (enabled_bindings_ & content::BINDINGS_POLICY_WEB_UI)
4289 GetWebUIBindings()->SetProperty(name, value); 4289 GetWebUIBindings()->SetProperty(name, value);
4290 else 4290 else
4291 NOTREACHED() << "WebUI bindings not enabled."; 4291 NOTREACHED() << "WebUI bindings not enabled.";
4292 } 4292 }
4293 4293
4294 void RenderViewImpl::OnDragTargetDragEnter(const WebDropData& drop_data, 4294 void RenderViewImpl::OnDragTargetDragEnter(const WebDropData& drop_data,
4295 const gfx::Point& client_point, 4295 const gfx::Point& client_point,
4296 const gfx::Point& screen_point, 4296 const gfx::Point& screen_point,
4297 WebDragOperationsMask ops) { 4297 WebDragOperationsMask ops,
4298 int key_modifiers) {
4298 WebDragOperation operation = webview()->dragTargetDragEnter( 4299 WebDragOperation operation = webview()->dragTargetDragEnter(
4299 drop_data.ToDragData(), 4300 drop_data.ToDragData(),
4300 client_point, 4301 client_point,
4301 screen_point, 4302 screen_point,
4302 ops); 4303 ops,
4304 key_modifiers);
4303 4305
4304 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); 4306 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation));
4305 } 4307 }
4306 4308
4307 void RenderViewImpl::OnDragTargetDragOver(const gfx::Point& client_point, 4309 void RenderViewImpl::OnDragTargetDragOver(const gfx::Point& client_point,
4308 const gfx::Point& screen_point, 4310 const gfx::Point& screen_point,
4309 WebDragOperationsMask ops) { 4311 WebDragOperationsMask ops,
4312 int key_modifiers) {
4310 WebDragOperation operation = webview()->dragTargetDragOver( 4313 WebDragOperation operation = webview()->dragTargetDragOver(
4311 client_point, 4314 client_point,
4312 screen_point, 4315 screen_point,
4313 ops); 4316 ops,
4317 key_modifiers);
4314 4318
4315 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation)); 4319 Send(new DragHostMsg_UpdateDragCursor(routing_id_, operation));
4316 } 4320 }
4317 4321
4318 void RenderViewImpl::OnDragTargetDragLeave() { 4322 void RenderViewImpl::OnDragTargetDragLeave() {
4319 webview()->dragTargetDragLeave(); 4323 webview()->dragTargetDragLeave();
4320 } 4324 }
4321 4325
4322 void RenderViewImpl::OnDragTargetDrop(const gfx::Point& client_point, 4326 void RenderViewImpl::OnDragTargetDrop(const gfx::Point& client_point,
4323 const gfx::Point& screen_point) { 4327 const gfx::Point& screen_point,
4324 webview()->dragTargetDrop(client_point, screen_point); 4328 int key_modifiers) {
4329 webview()->dragTargetDrop(client_point, screen_point, key_modifiers);
4325 4330
4326 Send(new DragHostMsg_TargetDrop_ACK(routing_id_)); 4331 Send(new DragHostMsg_TargetDrop_ACK(routing_id_));
4327 } 4332 }
4328 4333
4329 void RenderViewImpl::OnDragSourceEndedOrMoved(const gfx::Point& client_point, 4334 void RenderViewImpl::OnDragSourceEndedOrMoved(const gfx::Point& client_point,
4330 const gfx::Point& screen_point, 4335 const gfx::Point& screen_point,
4331 bool ended, 4336 bool ended,
4332 WebDragOperation op) { 4337 WebDragOperation op) {
4333 if (ended) { 4338 if (ended) {
4334 webview()->dragSourceEndedAt(client_point, screen_point, op); 4339 webview()->dragSourceEndedAt(client_point, screen_point, op);
(...skipping 1055 matching lines...) Expand 10 before | Expand all | Expand 10 after
5390 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const { 5395 bool RenderViewImpl::WebWidgetHandlesCompositorScheduling() const {
5391 return !!RenderThreadImpl::current()->compositor_thread(); 5396 return !!RenderThreadImpl::current()->compositor_thread();
5392 } 5397 }
5393 5398
5394 void RenderViewImpl::OnJavaBridgeInit() { 5399 void RenderViewImpl::OnJavaBridgeInit() {
5395 DCHECK(!java_bridge_dispatcher_); 5400 DCHECK(!java_bridge_dispatcher_);
5396 #if defined(ENABLE_JAVA_BRIDGE) 5401 #if defined(ENABLE_JAVA_BRIDGE)
5397 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this); 5402 java_bridge_dispatcher_ = new JavaBridgeDispatcher(this);
5398 #endif 5403 #endif
5399 } 5404 }
OLDNEW
« no previous file with comments | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698