OLD | NEW |
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 #include "ppapi/proxy/ppb_var_proxy.h" | 5 #include "ppapi/proxy/ppb_var_proxy.h" |
6 | 6 |
7 #include "ppapi/c/pp_var.h" | 7 #include "ppapi/c/pp_var.h" |
8 #include "ppapi/c/ppb_var.h" | 8 #include "ppapi/c/ppb_var.h" |
9 #include "ppapi/proxy/plugin_resource_tracker.h" | 9 #include "ppapi/proxy/plugin_resource_tracker.h" |
10 #include "ppapi/proxy/plugin_var_tracker.h" | 10 #include "ppapi/proxy/plugin_var_tracker.h" |
(...skipping 28 matching lines...) Expand all Loading... |
39 return NULL; | 39 return NULL; |
40 } | 40 } |
41 | 41 |
42 const PPB_Var var_interface = { | 42 const PPB_Var var_interface = { |
43 &AddRefVar, | 43 &AddRefVar, |
44 &ReleaseVar, | 44 &ReleaseVar, |
45 &VarFromUtf8, | 45 &VarFromUtf8, |
46 &VarToUtf8 | 46 &VarToUtf8 |
47 }; | 47 }; |
48 | 48 |
49 InterfaceProxy* CreateVarProxy(Dispatcher* dispatcher, | |
50 const void* target_interface) { | |
51 return new PPB_Var_Proxy(dispatcher, target_interface); | |
52 } | |
53 | |
54 } // namespace | 49 } // namespace |
55 | 50 |
56 PPB_Var_Proxy::PPB_Var_Proxy(Dispatcher* dispatcher, | 51 const PPB_Var* GetPPB_Var_Interface() { |
57 const void* target_interface) | 52 return &var_interface; |
58 : InterfaceProxy(dispatcher, target_interface) { | |
59 } | |
60 | |
61 PPB_Var_Proxy::~PPB_Var_Proxy() { | |
62 } | |
63 | |
64 // static | |
65 const InterfaceProxy::Info* PPB_Var_Proxy::GetInfo() { | |
66 static const Info info = { | |
67 &var_interface, | |
68 PPB_VAR_INTERFACE, | |
69 INTERFACE_ID_PPB_VAR, | |
70 false, | |
71 &CreateVarProxy, | |
72 }; | |
73 return &info; | |
74 } | |
75 | |
76 bool PPB_Var_Proxy::OnMessageReceived(const IPC::Message& msg) { | |
77 // All PPB_Var calls are handled locally; there is no need to send or receive | |
78 // messages here. | |
79 return false; | |
80 } | 53 } |
81 | 54 |
82 } // namespace proxy | 55 } // namespace proxy |
83 } // namespace ppapi | 56 } // namespace ppapi |
OLD | NEW |