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

Unified Diff: ppapi/proxy/extensions_common_resource.h

Issue 13080002: Apps V2 in Pepper: introduce singleton resource ExtensionsCommon. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: . Created 7 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | ppapi/proxy/extensions_common_resource.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ppapi/proxy/extensions_common_resource.h
diff --git a/ppapi/proxy/extensions_common_resource.h b/ppapi/proxy/extensions_common_resource.h
new file mode 100644
index 0000000000000000000000000000000000000000..83a2667ca9f8b4ee1edea06528f7e48876218c21
--- /dev/null
+++ b/ppapi/proxy/extensions_common_resource.h
@@ -0,0 +1,52 @@
+// Copyright (c) 2013 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef PPAPI_PROXY_EXTENSIONS_COMMON_RESOURCE_H_
+#define PPAPI_PROXY_EXTENSIONS_COMMON_RESOURCE_H_
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "ppapi/proxy/connection.h"
+#include "ppapi/proxy/plugin_resource.h"
+#include "ppapi/thunk/extensions_common_api.h"
+
+namespace base {
+class ListValue;
+}
+
+namespace ppapi {
+namespace proxy {
+
+class ResourceMessageReplyParams;
+
+class ExtensionsCommonResource : public PluginResource,
+ public thunk::ExtensionsCommon_API {
+ public:
+ ExtensionsCommonResource(Connection connection, PP_Instance instance);
+ virtual ~ExtensionsCommonResource();
+
+ // Resource overrides.
+ virtual thunk::ExtensionsCommon_API* AsExtensionsCommon_API() OVERRIDE;
+
+ // ExtensionsCommon_API implementation.
+ virtual int32_t Call(const std::string& request_name,
+ const std::vector<PP_Var>& input_args,
+ const std::vector<PP_Var*>& output_args,
+ scoped_refptr<TrackedCallback> callback) OVERRIDE;
+ virtual void Post(const std::string& request_name,
+ const std::vector<PP_Var>& args) OVERRIDE;
+
+ private:
+ void OnPluginMsgCallReply(const std::vector<PP_Var*>& output_args,
+ scoped_refptr<TrackedCallback> callback,
+ const ResourceMessageReplyParams& params,
+ const base::ListValue& output);
+
+ DISALLOW_COPY_AND_ASSIGN(ExtensionsCommonResource);
+};
+
+} // namespace proxy
+} // namespace ppapi
+
+#endif // PPAPI_PROXY_EXTENSIONS_COMMON_RESOURCE_H_
« no previous file with comments | « ppapi/ppapi_sources.gypi ('k') | ppapi/proxy/extensions_common_resource.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698