Chromium Code Reviews| Index: content/browser/renderer_host/render_view_host_impl.cc |
| diff --git a/content/browser/renderer_host/render_view_host_impl.cc b/content/browser/renderer_host/render_view_host_impl.cc |
| index d7b5686b9f8ec631b0b3de789ef6a6700c85fd1c..c9527ee463da048d4654b2ce1e7da96a33d203b3 100644 |
| --- a/content/browser/renderer_host/render_view_host_impl.cc |
| +++ b/content/browser/renderer_host/render_view_host_impl.cc |
| @@ -735,6 +735,26 @@ void RenderViewHostImpl::DisableFullscreenEncryptedMediaPlayback() { |
| } |
| #endif |
| +#if defined(USE_MOJO) |
| +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
|
| + // Never grant any bindings to browser plugin guests. |
| + if (GetProcess()->IsGuest()) { |
| + NOTREACHED() << "Never grant bindings to a guest process."; |
| + return; |
| + } |
| + |
| + if ((enabled_bindings_ & BINDINGS_POLICY_WEB_UI) == 0) { |
| + NOTREACHED() << "You must grant bindings before setting the handle"; |
| + return; |
| + } |
| + |
| + DCHECK(renderer_initialized_); |
| + RenderProcessHostImpl* process = |
| + static_cast<RenderProcessHostImpl*>(GetProcess()); |
| + process->SetWebUIHandle(GetRoutingID(), handle.Pass()); |
| +} |
| +#endif |
| + |
| void RenderViewHostImpl::DragTargetDragEnter( |
| const DropData& drop_data, |
| const gfx::Point& client_pt, |