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

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

Issue 7237039: Remove PPBoolToBool and BoolToPPBool and use PP_FromBool and PP_ToBool instead. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' 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
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/logging.h" 9 #include "base/logging.h"
10 #include "base/message_loop.h" 10 #include "base/message_loop.h"
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 void CallOnMainThread(int delay_in_ms, 58 void CallOnMainThread(int delay_in_ms,
59 PP_CompletionCallback callback, 59 PP_CompletionCallback callback,
60 int32_t result) { 60 int32_t result) {
61 GetMainThreadMessageLoop()->PostDelayedTask( 61 GetMainThreadMessageLoop()->PostDelayedTask(
62 FROM_HERE, 62 FROM_HERE,
63 NewRunnableFunction(callback.func, callback.user_data, result), 63 NewRunnableFunction(callback.func, callback.user_data, result),
64 delay_in_ms); 64 delay_in_ms);
65 } 65 }
66 66
67 PP_Bool IsMainThread() { 67 PP_Bool IsMainThread() {
68 return BoolToPPBool(GetMainThreadMessageLoop()->BelongsToCurrentThread()); 68 return PP_FromBool(GetMainThreadMessageLoop()->BelongsToCurrentThread());
69 } 69 }
70 70
71 const PPB_Core core_interface = { 71 const PPB_Core core_interface = {
72 &AddRefResource, 72 &AddRefResource,
73 &ReleaseResource, 73 &ReleaseResource,
74 &MemAlloc, 74 &MemAlloc,
75 &MemFree, 75 &MemFree,
76 &GetTime, 76 &GetTime,
77 &GetTimeTicks, 77 &GetTimeTicks,
78 &CallOnMainThread, 78 &CallOnMainThread,
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
122 void PPB_Core_Proxy::OnMsgAddRefResource(HostResource resource) { 122 void PPB_Core_Proxy::OnMsgAddRefResource(HostResource resource) {
123 ppb_core_target()->AddRefResource(resource.host_resource()); 123 ppb_core_target()->AddRefResource(resource.host_resource());
124 } 124 }
125 125
126 void PPB_Core_Proxy::OnMsgReleaseResource(HostResource resource) { 126 void PPB_Core_Proxy::OnMsgReleaseResource(HostResource resource) {
127 ppb_core_target()->ReleaseResource(resource.host_resource()); 127 ppb_core_target()->ReleaseResource(resource.host_resource());
128 } 128 }
129 129
130 } // namespace proxy 130 } // namespace proxy
131 } // namespace pp 131 } // namespace pp
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698