OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef PPAPI_PROXY_MOJO_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_MOJO_RESOURCE_H_ |
| 7 |
| 8 #include "ppapi/c/pp_instance.h" |
| 9 #include "ppapi/proxy/plugin_resource.h" |
| 10 #include "ppapi/proxy/ppapi_proxy_export.h" |
| 11 #include "ppapi/thunk/ppb_mojo_api.h" |
| 12 |
| 13 namespace ppapi { |
| 14 namespace proxy { |
| 15 |
| 16 class PPAPI_PROXY_EXPORT MojoResource |
| 17 : public PluginResource, |
| 18 public thunk::PPB_Mojo_API { |
| 19 public: |
| 20 MojoResource(Connection connection, PP_Instance instance); |
| 21 virtual ~MojoResource(); |
| 22 |
| 23 // Resource implementation |
| 24 virtual thunk::PPB_Mojo_API* AsPPB_Mojo_API() OVERRIDE; |
| 25 |
| 26 // PPB_Mojo_API |
| 27 virtual int32_t GetHandle(PP_Instance instance, |
| 28 uint32_t* out_mojo_handle, |
| 29 scoped_refptr<TrackedCallback> callback); |
| 30 private: |
| 31 void GetHandleComplete(uint32_t* out_mojo_handle, |
| 32 scoped_refptr<TrackedCallback> callback, |
| 33 const ResourceMessageReplyParams& params); |
| 34 }; |
| 35 |
| 36 } // namespace proxy |
| 37 } // namespace ppapi |
| 38 |
| 39 #endif // PPAPI_PROXY_MOJO_RESOURCE_H_ |
OLD | NEW |