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

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: 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/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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
496 } 496 }
497 497
498 int RenderViewHostImpl::GetPendingRequestId() { 498 int RenderViewHostImpl::GetPendingRequestId() {
499 return pending_request_id_; 499 return pending_request_id_;
500 } 500 }
501 501
502 void RenderViewHostImpl::DragTargetDragEnter( 502 void RenderViewHostImpl::DragTargetDragEnter(
503 const WebDropData& drop_data, 503 const WebDropData& drop_data,
504 const gfx::Point& client_pt, 504 const gfx::Point& client_pt,
505 const gfx::Point& screen_pt, 505 const gfx::Point& screen_pt,
506 WebDragOperationsMask operations_allowed) { 506 WebDragOperationsMask operations_allowed,
507 int key_modifiers) {
507 const int renderer_id = GetProcess()->GetID(); 508 const int renderer_id = GetProcess()->GetID();
508 ChildProcessSecurityPolicyImpl* policy = 509 ChildProcessSecurityPolicyImpl* policy =
509 ChildProcessSecurityPolicyImpl::GetInstance(); 510 ChildProcessSecurityPolicyImpl::GetInstance();
510 511
511 // The URL could have been cobbled together from any highlighted text string, 512 // The URL could have been cobbled together from any highlighted text string,
512 // and can't be interpreted as a capability. 513 // and can't be interpreted as a capability.
513 WebDropData filtered_data(drop_data); 514 WebDropData filtered_data(drop_data);
514 FilterURL(policy, renderer_id, true, &filtered_data.url); 515 FilterURL(policy, renderer_id, true, &filtered_data.url);
515 516
516 // The filenames vector, on the other hand, does represent a capability to 517 // The filenames vector, on the other hand, does represent a capability to
(...skipping 23 matching lines...) Expand all
540 541
541 fileapi::IsolatedContext* isolated_context = 542 fileapi::IsolatedContext* isolated_context =
542 fileapi::IsolatedContext::GetInstance(); 543 fileapi::IsolatedContext::GetInstance();
543 DCHECK(isolated_context); 544 DCHECK(isolated_context);
544 std::string filesystem_id = isolated_context->RegisterIsolatedFileSystem( 545 std::string filesystem_id = isolated_context->RegisterIsolatedFileSystem(
545 filesets); 546 filesets);
546 policy->GrantAccessFileSystem(renderer_id, filesystem_id); 547 policy->GrantAccessFileSystem(renderer_id, filesystem_id);
547 filtered_data.filesystem_id = UTF8ToUTF16(filesystem_id); 548 filtered_data.filesystem_id = UTF8ToUTF16(filesystem_id);
548 549
549 Send(new DragMsg_TargetDragEnter(GetRoutingID(), filtered_data, client_pt, 550 Send(new DragMsg_TargetDragEnter(GetRoutingID(), filtered_data, client_pt,
550 screen_pt, operations_allowed)); 551 screen_pt, operations_allowed,
552 key_modifiers));
551 } 553 }
552 554
553 void RenderViewHostImpl::DragTargetDragOver( 555 void RenderViewHostImpl::DragTargetDragOver(
554 const gfx::Point& client_pt, const gfx::Point& screen_pt, 556 const gfx::Point& client_pt, const gfx::Point& screen_pt,
555 WebDragOperationsMask operations_allowed) { 557 WebDragOperationsMask operations_allowed,
558 int key_modifiers) {
556 Send(new DragMsg_TargetDragOver(GetRoutingID(), client_pt, screen_pt, 559 Send(new DragMsg_TargetDragOver(GetRoutingID(), client_pt, screen_pt,
557 operations_allowed)); 560 operations_allowed, key_modifiers));
558 } 561 }
559 562
560 void RenderViewHostImpl::DragTargetDragLeave() { 563 void RenderViewHostImpl::DragTargetDragLeave() {
561 Send(new DragMsg_TargetDragLeave(GetRoutingID())); 564 Send(new DragMsg_TargetDragLeave(GetRoutingID()));
562 } 565 }
563 566
564 void RenderViewHostImpl::DragTargetDrop( 567 void RenderViewHostImpl::DragTargetDrop(
565 const gfx::Point& client_pt, const gfx::Point& screen_pt) { 568 const gfx::Point& client_pt, const gfx::Point& screen_pt,
566 Send(new DragMsg_TargetDrop(GetRoutingID(), client_pt, screen_pt)); 569 int key_modifiers) {
570 Send(new DragMsg_TargetDrop(GetRoutingID(), client_pt, screen_pt,
571 key_modifiers));
567 } 572 }
568 573
569 void RenderViewHostImpl::DesktopNotificationPermissionRequestDone( 574 void RenderViewHostImpl::DesktopNotificationPermissionRequestDone(
570 int callback_context) { 575 int callback_context) {
571 Send(new DesktopNotificationMsg_PermissionRequestDone( 576 Send(new DesktopNotificationMsg_PermissionRequestDone(
572 GetRoutingID(), callback_context)); 577 GetRoutingID(), callback_context));
573 } 578 }
574 579
575 void RenderViewHostImpl::DesktopNotificationPostDisplay(int callback_context) { 580 void RenderViewHostImpl::DesktopNotificationPostDisplay(int callback_context) {
576 Send(new DesktopNotificationMsg_PostDisplay(GetRoutingID(), 581 Send(new DesktopNotificationMsg_PostDisplay(GetRoutingID(),
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1833 // can cause navigations to be ignored in OnMsgNavigate. 1838 // can cause navigations to be ignored in OnMsgNavigate.
1834 is_waiting_for_beforeunload_ack_ = false; 1839 is_waiting_for_beforeunload_ack_ = false;
1835 is_waiting_for_unload_ack_ = false; 1840 is_waiting_for_unload_ack_ = false;
1836 } 1841 }
1837 1842
1838 void RenderViewHostImpl::ClearPowerSaveBlockers() { 1843 void RenderViewHostImpl::ClearPowerSaveBlockers() {
1839 STLDeleteValues(&power_save_blockers_); 1844 STLDeleteValues(&power_save_blockers_);
1840 } 1845 }
1841 1846
1842 } // namespace content 1847 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698