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

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

Issue 283623002: Add support for passing an arbitrary parameter to an IPC message handler. The motivation is for Web… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: sync Created 6 years, 7 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 "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 14 matching lines...) Expand all
25 PP_Resource resource) 25 PP_Resource resource)
26 : ResourceHost(host->GetPpapiHost(), instance, resource), 26 : ResourceHost(host->GetPpapiHost(), instance, resource),
27 renderer_ppapi_host_(host), 27 renderer_ppapi_host_(host),
28 weak_factory_(this) {} 28 weak_factory_(this) {}
29 29
30 PepperFlashDRMRendererHost::~PepperFlashDRMRendererHost() {} 30 PepperFlashDRMRendererHost::~PepperFlashDRMRendererHost() {}
31 31
32 int32_t PepperFlashDRMRendererHost::OnResourceMessageReceived( 32 int32_t PepperFlashDRMRendererHost::OnResourceMessageReceived(
33 const IPC::Message& msg, 33 const IPC::Message& msg,
34 ppapi::host::HostMessageContext* context) { 34 ppapi::host::HostMessageContext* context) {
35 IPC_BEGIN_MESSAGE_MAP(PepperFlashDRMRendererHost, msg) 35 PPAPI_BEGIN_MESSAGE_MAP(PepperFlashDRMRendererHost, msg)
36 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FlashDRM_GetVoucherFile, 36 PPAPI_DISPATCH_HOST_RESOURCE_CALL_0(PpapiHostMsg_FlashDRM_GetVoucherFile,
37 OnGetVoucherFile) 37 OnGetVoucherFile)
38 IPC_END_MESSAGE_MAP() 38 PPAPI_END_MESSAGE_MAP()
39 return PP_ERROR_FAILED; 39 return PP_ERROR_FAILED;
40 } 40 }
41 41
42 int32_t PepperFlashDRMRendererHost::OnGetVoucherFile( 42 int32_t PepperFlashDRMRendererHost::OnGetVoucherFile(
43 ppapi::host::HostMessageContext* context) { 43 ppapi::host::HostMessageContext* context) {
44 content::PepperPluginInstance* plugin_instance = 44 content::PepperPluginInstance* plugin_instance =
45 renderer_ppapi_host_->GetPluginInstance(pp_instance()); 45 renderer_ppapi_host_->GetPluginInstance(pp_instance());
46 if (!plugin_instance) 46 if (!plugin_instance)
47 return PP_ERROR_FAILED; 47 return PP_ERROR_FAILED;
48 48
(...skipping 29 matching lines...) Expand all
78 int browser_pending_host_id = browser_pending_host_ids[0]; 78 int browser_pending_host_id = browser_pending_host_ids[0];
79 79
80 ppapi::FileRefCreateInfo create_info = 80 ppapi::FileRefCreateInfo create_info =
81 ppapi::MakeExternalFileRefCreateInfo(external_path, 81 ppapi::MakeExternalFileRefCreateInfo(external_path,
82 std::string(), 82 std::string(),
83 browser_pending_host_id, 83 browser_pending_host_id,
84 renderer_pending_host_id); 84 renderer_pending_host_id);
85 host()->SendReply(reply_context, 85 host()->SendReply(reply_context,
86 PpapiPluginMsg_FlashDRM_GetVoucherFileReply(create_info)); 86 PpapiPluginMsg_FlashDRM_GetVoucherFileReply(create_info));
87 } 87 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698