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

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

Issue 7349016: Added versioning for PPB_Core::MemAlloc and MemFree (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Changes based on comments from dmichael Created 9 years, 5 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_char_set_proxy.cc ('k') | ppapi/shared_impl/char_set_impl.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_core_proxy.h" 5 #include "ppapi/proxy/ppb_core_proxy.h"
6 6
7 #include <stdlib.h> // For malloc 7 #include <stdlib.h> // For malloc
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 delay_in_ms); 73 delay_in_ms);
74 } 74 }
75 75
76 PP_Bool IsMainThread() { 76 PP_Bool IsMainThread() {
77 return PP_FromBool(GetMainThreadMessageLoop()->BelongsToCurrentThread()); 77 return PP_FromBool(GetMainThreadMessageLoop()->BelongsToCurrentThread());
78 } 78 }
79 79
80 const PPB_Core core_interface = { 80 const PPB_Core core_interface = {
81 &AddRefResource, 81 &AddRefResource,
82 &ReleaseResource, 82 &ReleaseResource,
83 &MemAlloc,
84 &MemFree,
85 &GetTime, 83 &GetTime,
86 &GetTimeTicks, 84 &GetTimeTicks,
87 &CallOnMainThread, 85 &CallOnMainThread,
88 &IsMainThread 86 &IsMainThread
89 }; 87 };
90 88
91 InterfaceProxy* CreateCoreProxy(Dispatcher* dispatcher, 89 InterfaceProxy* CreateCoreProxy(Dispatcher* dispatcher,
92 const void* target_interface) { 90 const void* target_interface) {
93 return new PPB_Core_Proxy(dispatcher, target_interface); 91 return new PPB_Core_Proxy(dispatcher, target_interface);
94 } 92 }
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 void PPB_Core_Proxy::OnMsgAddRefResource(HostResource resource) { 129 void PPB_Core_Proxy::OnMsgAddRefResource(HostResource resource) {
132 ppb_core_target()->AddRefResource(resource.host_resource()); 130 ppb_core_target()->AddRefResource(resource.host_resource());
133 } 131 }
134 132
135 void PPB_Core_Proxy::OnMsgReleaseResource(HostResource resource) { 133 void PPB_Core_Proxy::OnMsgReleaseResource(HostResource resource) {
136 ppb_core_target()->ReleaseResource(resource.host_resource()); 134 ppb_core_target()->ReleaseResource(resource.host_resource());
137 } 135 }
138 136
139 } // namespace proxy 137 } // namespace proxy
140 } // namespace pp 138 } // namespace pp
OLDNEW
« no previous file with comments | « ppapi/proxy/ppb_char_set_proxy.cc ('k') | ppapi/shared_impl/char_set_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698