OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
103 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBCore_AddRefResource, | 103 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBCore_AddRefResource, |
104 OnMsgAddRefResource) | 104 OnMsgAddRefResource) |
105 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBCore_ReleaseResource, | 105 IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBCore_ReleaseResource, |
106 OnMsgReleaseResource) | 106 OnMsgReleaseResource) |
107 IPC_MESSAGE_UNHANDLED(handled = false) | 107 IPC_MESSAGE_UNHANDLED(handled = false) |
108 IPC_END_MESSAGE_MAP() | 108 IPC_END_MESSAGE_MAP() |
109 // TODO(brettw) handle bad messages! | 109 // TODO(brettw) handle bad messages! |
110 return handled; | 110 return handled; |
111 } | 111 } |
112 | 112 |
113 void PPB_Core_Proxy::OnMsgAddRefResource(PP_Resource resource) { | 113 void PPB_Core_Proxy::OnMsgAddRefResource(HostResource resource) { |
114 ppb_core_target()->AddRefResource(resource); | 114 ppb_core_target()->AddRefResource(resource.host_resource()); |
115 } | 115 } |
116 | 116 |
117 void PPB_Core_Proxy::OnMsgReleaseResource(PP_Resource resource) { | 117 void PPB_Core_Proxy::OnMsgReleaseResource(HostResource resource) { |
118 ppb_core_target()->ReleaseResource(resource); | 118 ppb_core_target()->ReleaseResource(resource.host_resource()); |
119 } | 119 } |
120 | 120 |
121 } // namespace proxy | 121 } // namespace proxy |
122 } // namespace pp | 122 } // namespace pp |
OLD | NEW |