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 679 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
690 return CrossSiteRequestManager::GetInstance()->HasPendingCrossSiteRequest( | 690 return CrossSiteRequestManager::GetInstance()->HasPendingCrossSiteRequest( |
691 GetProcess()->GetID(), GetRoutingID()); | 691 GetProcess()->GetID(), GetRoutingID()); |
692 } | 692 } |
693 | 693 |
694 void RenderViewHostImpl::SetHasPendingCrossSiteRequest( | 694 void RenderViewHostImpl::SetHasPendingCrossSiteRequest( |
695 bool has_pending_request) { | 695 bool has_pending_request) { |
696 CrossSiteRequestManager::GetInstance()->SetHasPendingCrossSiteRequest( | 696 CrossSiteRequestManager::GetInstance()->SetHasPendingCrossSiteRequest( |
697 GetProcess()->GetID(), GetRoutingID(), has_pending_request); | 697 GetProcess()->GetID(), GetRoutingID(), has_pending_request); |
698 } | 698 } |
699 | 699 |
700 #if defined(OS_ANDROID) | |
701 void RenderViewHostImpl::ActivateNearestFindResult(int request_id, | |
702 float x, | |
703 float y) { | |
704 Send(new InputMsg_ActivateNearestFindResult(GetRoutingID(), | |
705 request_id, x, y)); | |
706 } | |
707 | |
708 void RenderViewHostImpl::RequestFindMatchRects(int current_version) { | |
709 Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version)); | |
710 } | |
711 | |
712 void RenderViewHostImpl::DisableFullscreenEncryptedMediaPlayback() { | |
713 media_player_manager_->DisableFullscreenEncryptedMediaPlayback(); | |
714 } | |
715 #endif | |
716 | |
717 #if defined(USE_MOJO) | |
718 void RenderViewHostImpl::SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) { | 700 void RenderViewHostImpl::SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) { |
719 // Never grant any bindings to browser plugin guests. | 701 // Never grant any bindings to browser plugin guests. |
720 if (GetProcess()->IsGuest()) { | 702 if (GetProcess()->IsGuest()) { |
721 NOTREACHED() << "Never grant bindings to a guest process."; | 703 NOTREACHED() << "Never grant bindings to a guest process."; |
722 return; | 704 return; |
723 } | 705 } |
724 | 706 |
725 if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) == 0) { | 707 if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) == 0) { |
726 NOTREACHED() << "You must grant bindings before setting the handle"; | 708 NOTREACHED() << "You must grant bindings before setting the handle"; |
727 return; | 709 return; |
728 } | 710 } |
729 | 711 |
730 DCHECK(renderer_initialized_); | 712 DCHECK(renderer_initialized_); |
731 RenderProcessHostImpl* process = | 713 RenderProcessHostImpl* process = |
732 static_cast<RenderProcessHostImpl*>(GetProcess()); | 714 static_cast<RenderProcessHostImpl*>(GetProcess()); |
733 process->SetWebUIHandle(GetRoutingID(), handle.Pass()); | 715 process->SetWebUIHandle(GetRoutingID(), handle.Pass()); |
734 } | 716 } |
| 717 |
| 718 #if defined(OS_ANDROID) |
| 719 void RenderViewHostImpl::ActivateNearestFindResult(int request_id, |
| 720 float x, |
| 721 float y) { |
| 722 Send(new InputMsg_ActivateNearestFindResult(GetRoutingID(), |
| 723 request_id, x, y)); |
| 724 } |
| 725 |
| 726 void RenderViewHostImpl::RequestFindMatchRects(int current_version) { |
| 727 Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version)); |
| 728 } |
| 729 |
| 730 void RenderViewHostImpl::DisableFullscreenEncryptedMediaPlayback() { |
| 731 media_player_manager_->DisableFullscreenEncryptedMediaPlayback(); |
| 732 } |
735 #endif | 733 #endif |
736 | 734 |
737 void RenderViewHostImpl::DragTargetDragEnter( | 735 void RenderViewHostImpl::DragTargetDragEnter( |
738 const DropData& drop_data, | 736 const DropData& drop_data, |
739 const gfx::Point& client_pt, | 737 const gfx::Point& client_pt, |
740 const gfx::Point& screen_pt, | 738 const gfx::Point& screen_pt, |
741 WebDragOperationsMask operations_allowed, | 739 WebDragOperationsMask operations_allowed, |
742 int key_modifiers) { | 740 int key_modifiers) { |
743 const int renderer_id = GetProcess()->GetID(); | 741 const int renderer_id = GetProcess()->GetID(); |
744 ChildProcessSecurityPolicyImpl* policy = | 742 ChildProcessSecurityPolicyImpl* policy = |
(...skipping 1104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1849 return true; | 1847 return true; |
1850 } | 1848 } |
1851 | 1849 |
1852 void RenderViewHostImpl::AttachToFrameTree() { | 1850 void RenderViewHostImpl::AttachToFrameTree() { |
1853 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1851 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1854 | 1852 |
1855 frame_tree->ResetForMainFrameSwap(); | 1853 frame_tree->ResetForMainFrameSwap(); |
1856 } | 1854 } |
1857 | 1855 |
1858 } // namespace content | 1856 } // namespace content |
OLD | NEW |