| Index: content/browser/web_contents/web_contents_impl.cc
|
| diff --git a/content/browser/web_contents/web_contents_impl.cc b/content/browser/web_contents/web_contents_impl.cc
|
| index 6643adaedca83f3bf8b0f307583f503a0ec2e9ee..ee2d73267776e86eefd482c15ed37fb59d42c6a8 100644
|
| --- a/content/browser/web_contents/web_contents_impl.cc
|
| +++ b/content/browser/web_contents/web_contents_impl.cc
|
| @@ -690,6 +690,8 @@ bool WebContentsImpl::OnMessageReceived(RenderViewHost* render_view_host,
|
| OnSetSelectedColorInColorChooser)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_PepperPluginHung, OnPepperPluginHung)
|
| IPC_MESSAGE_HANDLER(ViewHostMsg_WebUISend, OnWebUISend)
|
| + IPC_MESSAGE_HANDLER(ViewHostMsg_RequestPpapiBrokerPermission,
|
| + OnRequestPpapiBrokerPermission)
|
| IPC_MESSAGE_UNHANDLED(handled = false)
|
| IPC_END_MESSAGE_MAP_EX()
|
| message_source_ = NULL;
|
| @@ -2191,6 +2193,29 @@ void WebContentsImpl::OnWebUISend(const GURL& source_url,
|
| delegate_->WebUISend(this, source_url, name, args);
|
| }
|
|
|
| +void WebContentsImpl::OnRequestPpapiBrokerPermission(
|
| + int request_id,
|
| + const GURL& url,
|
| + const FilePath& plugin_path) {
|
| + if (!delegate_) {
|
| + OnPpapiBrokerPermissionResult(request_id, false);
|
| + return;
|
| + }
|
| +
|
| + delegate_->RequestPpapiBrokerPermission(
|
| + this, url, plugin_path,
|
| + base::Bind(&WebContentsImpl::OnPpapiBrokerPermissionResult,
|
| + base::Unretained(this), request_id));
|
| +}
|
| +
|
| +void WebContentsImpl::OnPpapiBrokerPermissionResult(int request_id,
|
| + bool result) {
|
| + RenderViewHostImpl* rvh = GetRenderViewHostImpl();
|
| + rvh->Send(new ViewMsg_PpapiBrokerPermissionResult(rvh->GetRoutingID(),
|
| + request_id,
|
| + result));
|
| +}
|
| +
|
| // Notifies the RenderWidgetHost instance about the fact that the page is
|
| // loading, or done loading and calls the base implementation.
|
| void WebContentsImpl::SetIsLoading(bool is_loading,
|
|
|