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

Side by Side Diff: chrome/renderer/pepper/pepper_flash_drm_renderer_host.cc

Issue 730603002: PPAPI: Refactor renderer side of browser host creation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Merge Created 6 years, 1 month 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
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 "chrome/renderer/pepper/pepper_flash_drm_renderer_host.h" 5 #include "chrome/renderer/pepper/pepper_flash_drm_renderer_host.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 #include "content/public/renderer/pepper_plugin_instance.h" 8 #include "content/public/renderer/pepper_plugin_instance.h"
9 #include "content/public/renderer/renderer_ppapi_host.h" 9 #include "content/public/renderer/renderer_ppapi_host.h"
10 #include "ppapi/c/pp_errors.h" 10 #include "ppapi/c/pp_errors.h"
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
66 context->MakeReplyMessageContext(), 66 context->MakeReplyMessageContext(),
67 voucher_file, 67 voucher_file,
68 renderer_pending_host_id)); 68 renderer_pending_host_id));
69 return PP_OK_COMPLETIONPENDING; 69 return PP_OK_COMPLETIONPENDING;
70 } 70 }
71 71
72 void PepperFlashDRMRendererHost::DidCreateFileRefHosts( 72 void PepperFlashDRMRendererHost::DidCreateFileRefHosts(
73 const ppapi::host::ReplyMessageContext& reply_context, 73 const ppapi::host::ReplyMessageContext& reply_context,
74 const base::FilePath& external_path, 74 const base::FilePath& external_path,
75 int renderer_pending_host_id, 75 int renderer_pending_host_id,
76 const std::vector<int>& browser_pending_host_ids) { 76 const ppapi::proxy::CompletedBrowserResourceHosts& browser_hosts) {
77 DCHECK_EQ(1U, browser_pending_host_ids.size()); 77 if (browser_hosts.host_ids.empty()) {
78 int browser_pending_host_id = browser_pending_host_ids[0]; 78 NOTREACHED();
79 return;
80 }
81 int browser_pending_host_id = browser_hosts.host_ids[0];
79 82
80 ppapi::FileRefCreateInfo create_info = 83 ppapi::FileRefCreateInfo create_info =
81 ppapi::MakeExternalFileRefCreateInfo(external_path, 84 ppapi::MakeExternalFileRefCreateInfo(external_path,
82 std::string(), 85 std::string(),
83 browser_pending_host_id, 86 browser_pending_host_id,
84 renderer_pending_host_id); 87 renderer_pending_host_id);
85 host()->SendReply(reply_context, 88 host()->SendReply(reply_context,
86 PpapiPluginMsg_FlashDRM_GetVoucherFileReply(create_info)); 89 PpapiPluginMsg_FlashDRM_GetVoucherFileReply(create_info));
87 } 90 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698