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 722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
733 | 733 |
734 void RenderViewHostImpl::RequestFindMatchRects(int current_version) { | 734 void RenderViewHostImpl::RequestFindMatchRects(int current_version) { |
735 Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version)); | 735 Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version)); |
736 } | 736 } |
737 | 737 |
738 void RenderViewHostImpl::DisableFullscreenEncryptedMediaPlayback() { | 738 void RenderViewHostImpl::DisableFullscreenEncryptedMediaPlayback() { |
739 media_player_manager_->DisableFullscreenEncryptedMediaPlayback(); | 739 media_player_manager_->DisableFullscreenEncryptedMediaPlayback(); |
740 } | 740 } |
741 #endif | 741 #endif |
742 | 742 |
| 743 #if defined(USE_MOJO) |
| 744 void RenderViewHostImpl::SetWebUIHandle(mojo::ScopedMessagePipeHandle handle) { |
| 745 // Never grant any bindings to browser plugin guests. |
| 746 if (GetProcess()->IsGuest()) { |
| 747 NOTREACHED() << "Never grant bindings to a guest process."; |
| 748 return; |
| 749 } |
| 750 |
| 751 if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) == 0) { |
| 752 NOTREACHED() << "You must grant bindings before setting the handle"; |
| 753 return; |
| 754 } |
| 755 |
| 756 DCHECK(renderer_initialized_); |
| 757 RenderProcessHostImpl* process = |
| 758 static_cast<RenderProcessHostImpl*>(GetProcess()); |
| 759 process->SetWebUIHandle(GetRoutingID(), handle.Pass()); |
| 760 } |
| 761 #endif |
| 762 |
743 void RenderViewHostImpl::DragTargetDragEnter( | 763 void RenderViewHostImpl::DragTargetDragEnter( |
744 const DropData& drop_data, | 764 const DropData& drop_data, |
745 const gfx::Point& client_pt, | 765 const gfx::Point& client_pt, |
746 const gfx::Point& screen_pt, | 766 const gfx::Point& screen_pt, |
747 WebDragOperationsMask operations_allowed, | 767 WebDragOperationsMask operations_allowed, |
748 int key_modifiers) { | 768 int key_modifiers) { |
749 const int renderer_id = GetProcess()->GetID(); | 769 const int renderer_id = GetProcess()->GetID(); |
750 ChildProcessSecurityPolicyImpl* policy = | 770 ChildProcessSecurityPolicyImpl* policy = |
751 ChildProcessSecurityPolicyImpl::GetInstance(); | 771 ChildProcessSecurityPolicyImpl::GetInstance(); |
752 | 772 |
(...skipping 1175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1928 return true; | 1948 return true; |
1929 } | 1949 } |
1930 | 1950 |
1931 void RenderViewHostImpl::AttachToFrameTree() { | 1951 void RenderViewHostImpl::AttachToFrameTree() { |
1932 FrameTree* frame_tree = delegate_->GetFrameTree(); | 1952 FrameTree* frame_tree = delegate_->GetFrameTree(); |
1933 | 1953 |
1934 frame_tree->ResetForMainFrameSwap(); | 1954 frame_tree->ResetForMainFrameSwap(); |
1935 } | 1955 } |
1936 | 1956 |
1937 } // namespace content | 1957 } // namespace content |
OLD | NEW |