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