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

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

Issue 8333004: Rename InterfaceID to ApiID and move the file. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merged Created 9 years, 2 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/ppb_buffer_proxy.h ('k') | ppapi/proxy/ppb_context_3d_proxy.h » ('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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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/ppb_buffer_proxy.h" 5 #include "ppapi/proxy/ppb_buffer_proxy.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "build/build_config.h" 10 #include "build/build_config.h"
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
71 // static 71 // static
72 PP_Resource PPB_Buffer_Proxy::CreateProxyResource(PP_Instance instance, 72 PP_Resource PPB_Buffer_Proxy::CreateProxyResource(PP_Instance instance,
73 uint32_t size) { 73 uint32_t size) {
74 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance); 74 PluginDispatcher* dispatcher = PluginDispatcher::GetForInstance(instance);
75 if (!dispatcher) 75 if (!dispatcher)
76 return 0; 76 return 0;
77 77
78 HostResource result; 78 HostResource result;
79 base::SharedMemoryHandle shm_handle = base::SharedMemory::NULLHandle(); 79 base::SharedMemoryHandle shm_handle = base::SharedMemory::NULLHandle();
80 dispatcher->Send(new PpapiHostMsg_PPBBuffer_Create( 80 dispatcher->Send(new PpapiHostMsg_PPBBuffer_Create(
81 INTERFACE_ID_PPB_BUFFER, instance, size, 81 API_ID_PPB_BUFFER, instance, size,
82 &result, &shm_handle)); 82 &result, &shm_handle));
83 if (result.is_null() || !base::SharedMemory::IsHandleValid(shm_handle)) 83 if (result.is_null() || !base::SharedMemory::IsHandleValid(shm_handle))
84 return 0; 84 return 0;
85 85
86 return AddProxyResource(result, shm_handle, size); 86 return AddProxyResource(result, shm_handle, size);
87 } 87 }
88 88
89 // static 89 // static
90 PP_Resource PPB_Buffer_Proxy::AddProxyResource( 90 PP_Resource PPB_Buffer_Proxy::AddProxyResource(
91 const HostResource& resource, 91 const HostResource& resource,
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 #elif defined(OS_POSIX) 141 #elif defined(OS_POSIX)
142 local_fd; 142 local_fd;
143 #else 143 #else
144 #error Not implemented. 144 #error Not implemented.
145 #endif 145 #endif
146 *result_shm_handle = dispatcher->ShareHandleWithRemote(platform_file, false); 146 *result_shm_handle = dispatcher->ShareHandleWithRemote(platform_file, false);
147 } 147 }
148 148
149 } // namespace proxy 149 } // namespace proxy
150 } // namespace ppapi 150 } // namespace ppapi
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_buffer_proxy.h ('k') | ppapi/proxy/ppb_context_3d_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698