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

Side by Side Diff: content/browser/renderer_host/render_view_host_impl.cc

Issue 206923002: Adds plumbing to pass WebUI mojo::Handle from browser to renderer (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: merge 2 trunk Created 6 years, 9 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 717 matching lines...) Expand 10 before | Expand all | Expand 10 after
728 728
729 void RenderViewHostImpl::RequestFindMatchRects(int current_version) { 729 void RenderViewHostImpl::RequestFindMatchRects(int current_version) {
730 Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version)); 730 Send(new ViewMsg_FindMatchRects(GetRoutingID(), current_version));
731 } 731 }
732 732
733 void RenderViewHostImpl::DisableFullscreenEncryptedMediaPlayback() { 733 void RenderViewHostImpl::DisableFullscreenEncryptedMediaPlayback() {
734 media_player_manager_->DisableFullscreenEncryptedMediaPlayback(); 734 media_player_manager_->DisableFullscreenEncryptedMediaPlayback();
735 } 735 }
736 #endif 736 #endif
737 737
738 #if defined(USE_MOJO)
739 void RenderViewHostImpl::SetBrowserWebUIHandle(mojo::ScopedHandle handle) {
darin (slow to review) 2014/03/21 00:04:52 why is this method named SetBrowserWebUIHandle whe
sky 2014/03/21 03:19:16 I failed at keeping this consistent. I went with S
740 // Never grant any bindings to browser plugin guests.
741 if (GetProcess()->IsGuest()) {
742 NOTREACHED() << "Never grant bindings to a guest process.";
743 return;
744 }
745
746 if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) == 0) {
747 NOTREACHED() << "You must grant bindings before setting the handle";
748 return;
749 }
750
751 DCHECK(renderer_initialized_);
752 RenderProcessHostImpl* process =
753 static_cast<RenderProcessHostImpl*>(GetProcess());
754 process->SetWebUIHandle(GetRoutingID(), handle.Pass());
755 }
756 #endif
757
738 void RenderViewHostImpl::DragTargetDragEnter( 758 void RenderViewHostImpl::DragTargetDragEnter(
739 const DropData& drop_data, 759 const DropData& drop_data,
740 const gfx::Point& client_pt, 760 const gfx::Point& client_pt,
741 const gfx::Point& screen_pt, 761 const gfx::Point& screen_pt,
742 WebDragOperationsMask operations_allowed, 762 WebDragOperationsMask operations_allowed,
743 int key_modifiers) { 763 int key_modifiers) {
744 const int renderer_id = GetProcess()->GetID(); 764 const int renderer_id = GetProcess()->GetID();
745 ChildProcessSecurityPolicyImpl* policy = 765 ChildProcessSecurityPolicyImpl* policy =
746 ChildProcessSecurityPolicyImpl::GetInstance(); 766 ChildProcessSecurityPolicyImpl::GetInstance();
747 767
(...skipping 1182 matching lines...) Expand 10 before | Expand all | Expand 10 after
1930 return true; 1950 return true;
1931 } 1951 }
1932 1952
1933 void RenderViewHostImpl::AttachToFrameTree() { 1953 void RenderViewHostImpl::AttachToFrameTree() {
1934 FrameTree* frame_tree = delegate_->GetFrameTree(); 1954 FrameTree* frame_tree = delegate_->GetFrameTree();
1935 1955
1936 frame_tree->ResetForMainFrameSwap(); 1956 frame_tree->ResetForMainFrameSwap();
1937 } 1957 }
1938 1958
1939 } // namespace content 1959 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698