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

Side by Side Diff: content/browser/renderer_host/render_view_host_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: 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/browser/renderer_host/render_view_host_impl.h" 5 #include "content/browser/renderer_host/render_view_host_impl.h"
6 6
7 #include <set> 7 #include <set>
8 #include <string> 8 #include <string>
9 #include <utility> 9 #include <utility>
10 #include <vector> 10 #include <vector>
(...skipping 484 matching lines...) Expand 10 before | Expand all | Expand 10 after
495 } 495 }
496 496
497 int RenderViewHostImpl::GetPendingRequestId() { 497 int RenderViewHostImpl::GetPendingRequestId() {
498 return pending_request_id_; 498 return pending_request_id_;
499 } 499 }
500 500
501 void RenderViewHostImpl::DragTargetDragEnter( 501 void RenderViewHostImpl::DragTargetDragEnter(
502 const WebDropData& drop_data, 502 const WebDropData& drop_data,
503 const gfx::Point& client_pt, 503 const gfx::Point& client_pt,
504 const gfx::Point& screen_pt, 504 const gfx::Point& screen_pt,
505 WebDragOperationsMask operations_allowed) { 505 WebDragOperationsMask operations_allowed,
506 int key_modifiers) {
506 const int renderer_id = GetProcess()->GetID(); 507 const int renderer_id = GetProcess()->GetID();
507 ChildProcessSecurityPolicyImpl* policy = 508 ChildProcessSecurityPolicyImpl* policy =
508 ChildProcessSecurityPolicyImpl::GetInstance(); 509 ChildProcessSecurityPolicyImpl::GetInstance();
509 510
510 // The URL could have been cobbled together from any highlighted text string, 511 // The URL could have been cobbled together from any highlighted text string,
511 // and can't be interpreted as a capability. 512 // and can't be interpreted as a capability.
512 WebDropData filtered_data(drop_data); 513 WebDropData filtered_data(drop_data);
513 FilterURL(policy, renderer_id, true, &filtered_data.url); 514 FilterURL(policy, renderer_id, true, &filtered_data.url);
514 515
515 // The filenames vector, on the other hand, does represent a capability to 516 // The filenames vector, on the other hand, does represent a capability to
(...skipping 23 matching lines...) Expand all
539 540
540 fileapi::IsolatedContext* isolated_context = 541 fileapi::IsolatedContext* isolated_context =
541 fileapi::IsolatedContext::GetInstance(); 542 fileapi::IsolatedContext::GetInstance();
542 DCHECK(isolated_context); 543 DCHECK(isolated_context);
543 std::string filesystem_id = isolated_context->RegisterIsolatedFileSystem( 544 std::string filesystem_id = isolated_context->RegisterIsolatedFileSystem(
544 filesets); 545 filesets);
545 policy->GrantAccessFileSystem(renderer_id, filesystem_id); 546 policy->GrantAccessFileSystem(renderer_id, filesystem_id);
546 filtered_data.filesystem_id = UTF8ToUTF16(filesystem_id); 547 filtered_data.filesystem_id = UTF8ToUTF16(filesystem_id);
547 548
548 Send(new DragMsg_TargetDragEnter(GetRoutingID(), filtered_data, client_pt, 549 Send(new DragMsg_TargetDragEnter(GetRoutingID(), filtered_data, client_pt,
549 screen_pt, operations_allowed)); 550 screen_pt, operations_allowed,
551 key_modifiers));
550 } 552 }
551 553
552 void RenderViewHostImpl::DragTargetDragOver( 554 void RenderViewHostImpl::DragTargetDragOver(
553 const gfx::Point& client_pt, const gfx::Point& screen_pt, 555 const gfx::Point& client_pt, const gfx::Point& screen_pt,
554 WebDragOperationsMask operations_allowed) { 556 WebDragOperationsMask operations_allowed,
557 int key_modifiers) {
555 Send(new DragMsg_TargetDragOver(GetRoutingID(), client_pt, screen_pt, 558 Send(new DragMsg_TargetDragOver(GetRoutingID(), client_pt, screen_pt,
556 operations_allowed)); 559 operations_allowed, key_modifiers));
557 } 560 }
558 561
559 void RenderViewHostImpl::DragTargetDragLeave() { 562 void RenderViewHostImpl::DragTargetDragLeave() {
560 Send(new DragMsg_TargetDragLeave(GetRoutingID())); 563 Send(new DragMsg_TargetDragLeave(GetRoutingID()));
561 } 564 }
562 565
563 void RenderViewHostImpl::DragTargetDrop( 566 void RenderViewHostImpl::DragTargetDrop(
564 const gfx::Point& client_pt, const gfx::Point& screen_pt) { 567 const gfx::Point& client_pt, const gfx::Point& screen_pt,
565 Send(new DragMsg_TargetDrop(GetRoutingID(), client_pt, screen_pt)); 568 int key_modifiers) {
569 Send(new DragMsg_TargetDrop(GetRoutingID(), client_pt, screen_pt,
570 key_modifiers));
jam 2012/05/15 16:57:53 nit: spacing is off?
varunjain 2012/05/15 23:03:39 Done.
566 } 571 }
567 572
568 void RenderViewHostImpl::DesktopNotificationPermissionRequestDone( 573 void RenderViewHostImpl::DesktopNotificationPermissionRequestDone(
569 int callback_context) { 574 int callback_context) {
570 Send(new DesktopNotificationMsg_PermissionRequestDone( 575 Send(new DesktopNotificationMsg_PermissionRequestDone(
571 GetRoutingID(), callback_context)); 576 GetRoutingID(), callback_context));
572 } 577 }
573 578
574 void RenderViewHostImpl::DesktopNotificationPostDisplay(int callback_context) { 579 void RenderViewHostImpl::DesktopNotificationPostDisplay(int callback_context) {
575 Send(new DesktopNotificationMsg_PostDisplay(GetRoutingID(), 580 Send(new DesktopNotificationMsg_PostDisplay(GetRoutingID(),
(...skipping 1227 matching lines...) Expand 10 before | Expand all | Expand 10 after
1803 // can cause navigations to be ignored in OnMsgNavigate. 1808 // can cause navigations to be ignored in OnMsgNavigate.
1804 is_waiting_for_beforeunload_ack_ = false; 1809 is_waiting_for_beforeunload_ack_ = false;
1805 is_waiting_for_unload_ack_ = false; 1810 is_waiting_for_unload_ack_ = false;
1806 } 1811 }
1807 1812
1808 void RenderViewHostImpl::ClearPowerSaveBlockers() { 1813 void RenderViewHostImpl::ClearPowerSaveBlockers() {
1809 STLDeleteValues(&power_save_blockers_); 1814 STLDeleteValues(&power_save_blockers_);
1810 } 1815 }
1811 1816
1812 } // namespace content 1817 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698