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

Side by Side Diff: ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_var.h

Issue 9022021: Proxy PPB_ArrayBuffer_Dev, make them work over Messaging (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Review comment. Created 8 years, 11 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 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VAR_H_ 5 #ifndef NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VAR_H_
6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VAR_H_ 6 #define NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VAR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "native_client/src/include/nacl_macros.h" 10 #include "native_client/src/include/nacl_macros.h"
11 #include "native_client/src/include/portability.h" 11 #include "native_client/src/include/portability.h"
12 #include "ppapi/c/dev/ppb_var_array_buffer_dev.h"
12 #include "ppapi/c/pp_var.h" 13 #include "ppapi/c/pp_var.h"
13 #include "ppapi/c/ppb_var.h" 14 #include "ppapi/c/ppb_var.h"
14 15
15 namespace ppapi_proxy { 16 namespace ppapi_proxy {
16 17
17 // Implements the plugin side of the PPB_Var interface. 18 // Implements the plugin side of the PPB_Var interface.
18 // This implementation also determines how PP_Vars are represented internally 19 // This implementation also determines how PP_Vars are represented internally
19 // in the proxied implementation. 20 // in the proxied implementation.
20 class PluginVar { 21 class PluginVar {
21 public: 22 public:
22 // Returns an interface pointer suitable to the PPAPI client. 23 // Returns an interface pointer suitable to the PPAPI client.
23 static const PPB_Var* GetInterface(); 24 static const PPB_Var* GetInterface();
24 // Returns the 1.0 interface to support backwards-compatibility. 25 // Returns the 1.0 interface to support backwards-compatibility.
25 static const PPB_Var_1_0* GetInterface1_0(); 26 static const PPB_Var_1_0* GetInterface1_0();
26 27
28 // Returns an interface pointer for the PPB_VarArrayBuffer_Dev interface.
29 static const PPB_VarArrayBuffer_Dev* GetArrayBufferInterface();
30
27 // String helpers. 31 // String helpers.
28 static PP_Var StringToPPVar(const std::string& str); 32 static PP_Var StringToPPVar(const std::string& str);
29 static std::string PPVarToString(const PP_Var& var); 33 static std::string PPVarToString(const PP_Var& var);
30 34
31 // Printing and debugging. 35 // Printing and debugging.
32 static void Print(const PP_Var& var); 36 static void Print(const PP_Var& var);
33 static std::string DebugString(const PP_Var& var); 37 static std::string DebugString(const PP_Var& var);
34 38
35 private: 39 private:
36 NACL_DISALLOW_COPY_AND_ASSIGN(PluginVar); 40 NACL_DISALLOW_COPY_AND_ASSIGN(PluginVar);
37 }; 41 };
38 42
39 } // namespace ppapi_proxy 43 } // namespace ppapi_proxy
40 44
41 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VAR_H_ 45 #endif // NATIVE_CLIENT_SRC_SHARED_PPAPI_PROXY_PLUGIN_VAR_H_
42 46
OLDNEW
« no previous file with comments | « ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb.cc ('k') | ppapi/native_client/src/shared/ppapi_proxy/plugin_ppb_var.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698