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

Side by Side Diff: ppapi/proxy/flash_drm_resource.cc

Issue 21966004: Pepper: Move FileRef to the "new" resource proxy. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Another rebase Created 7 years, 3 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
« no previous file with comments | « ppapi/proxy/flash_drm_resource.h ('k') | ppapi/proxy/flash_file_resource.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ppapi/proxy/flash_drm_resource.h" 5 #include "ppapi/proxy/flash_drm_resource.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "ppapi/c/pp_errors.h" 8 #include "ppapi/c/pp_errors.h"
9 #include "ppapi/proxy/dispatch_reply_message.h" 9 #include "ppapi/proxy/dispatch_reply_message.h"
10 #include "ppapi/proxy/file_ref_resource.h"
10 #include "ppapi/proxy/ppapi_messages.h" 11 #include "ppapi/proxy/ppapi_messages.h"
11 #include "ppapi/proxy/ppb_file_ref_proxy.h"
12 #include "ppapi/shared_impl/ppb_file_ref_shared.h"
13 #include "ppapi/shared_impl/var.h" 12 #include "ppapi/shared_impl/var.h"
14 13
15 namespace ppapi { 14 namespace ppapi {
16 namespace proxy { 15 namespace proxy {
17 16
18 FlashDRMResource::FlashDRMResource(Connection connection, 17 FlashDRMResource::FlashDRMResource(Connection connection,
19 PP_Instance instance) 18 PP_Instance instance)
20 : PluginResource(connection, instance) { 19 : PluginResource(connection, instance) {
21 SendCreate(BROWSER, PpapiHostMsg_FlashDRM_Create()); 20 SendCreate(BROWSER, PpapiHostMsg_FlashDRM_Create());
22 SendCreate(RENDERER, PpapiHostMsg_FlashDRM_Create()); 21 SendCreate(RENDERER, PpapiHostMsg_FlashDRM_Create());
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 if (params.result() == PP_OK) 80 if (params.result() == PP_OK)
82 *dest = StringVar::StringToPPVar(id); 81 *dest = StringVar::StringToPPVar(id);
83 callback->Run(params.result()); 82 callback->Run(params.result());
84 } 83 }
85 } 84 }
86 85
87 void FlashDRMResource::OnPluginMsgGetVoucherFileReply( 86 void FlashDRMResource::OnPluginMsgGetVoucherFileReply(
88 PP_Resource* dest, 87 PP_Resource* dest,
89 scoped_refptr<TrackedCallback> callback, 88 scoped_refptr<TrackedCallback> callback,
90 const ResourceMessageReplyParams& params, 89 const ResourceMessageReplyParams& params,
91 const PPB_FileRef_CreateInfo& file_info) { 90 const FileRefCreateInfo& file_info) {
92 if (TrackedCallback::IsPending(callback)) { 91 if (TrackedCallback::IsPending(callback)) {
93 if (params.result() == PP_OK) 92 if (params.result() == PP_OK) {
94 *dest = PPB_FileRef_Proxy::DeserializeFileRef(file_info); 93 *dest = FileRefResource::CreateFileRef(
94 connection(),
95 pp_instance(),
96 file_info);
97 }
95 callback->Run(params.result()); 98 callback->Run(params.result());
96 } 99 }
97 } 100 }
98 101
99 } // namespace proxy 102 } // namespace proxy
100 } // namespace ppapi 103 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/flash_drm_resource.h ('k') | ppapi/proxy/flash_file_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698