OLD | NEW |
(Empty) | |
| 1 // Copyright (c) 2013 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_EXTENSIONS_COMMON_RESOURCE_H_ |
| 6 #define PPAPI_PROXY_EXTENSIONS_COMMON_RESOURCE_H_ |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "base/compiler_specific.h" |
| 10 #include "ppapi/proxy/connection.h" |
| 11 #include "ppapi/proxy/plugin_resource.h" |
| 12 #include "ppapi/thunk/extensions_common_api.h" |
| 13 |
| 14 namespace base { |
| 15 class ListValue; |
| 16 } |
| 17 |
| 18 namespace ppapi { |
| 19 namespace proxy { |
| 20 |
| 21 class ResourceMessageReplyParams; |
| 22 |
| 23 class ExtensionsCommonResource : public PluginResource, |
| 24 public thunk::ExtensionsCommon_API { |
| 25 public: |
| 26 ExtensionsCommonResource(Connection connection, PP_Instance instance); |
| 27 virtual ~ExtensionsCommonResource(); |
| 28 |
| 29 // Resource overrides. |
| 30 virtual thunk::ExtensionsCommon_API* AsExtensionsCommon_API() OVERRIDE; |
| 31 |
| 32 // ExtensionsCommon_API implementation. |
| 33 virtual int32_t Call(const std::string& request_name, |
| 34 const std::vector<PP_Var>& input_args, |
| 35 const std::vector<PP_Var*>& output_args, |
| 36 scoped_refptr<TrackedCallback> callback) OVERRIDE; |
| 37 virtual void Post(const std::string& request_name, |
| 38 const std::vector<PP_Var>& args) OVERRIDE; |
| 39 |
| 40 private: |
| 41 void OnPluginMsgCallReply(const std::vector<PP_Var*>& output_args, |
| 42 scoped_refptr<TrackedCallback> callback, |
| 43 const ResourceMessageReplyParams& params, |
| 44 const base::ListValue& output); |
| 45 |
| 46 DISALLOW_COPY_AND_ASSIGN(ExtensionsCommonResource); |
| 47 }; |
| 48 |
| 49 } // namespace proxy |
| 50 } // namespace ppapi |
| 51 |
| 52 #endif // PPAPI_PROXY_EXTENSIONS_COMMON_RESOURCE_H_ |
OLD | NEW |