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 #ifndef PPAPI_PROXY_DISPATCHER_H_ | 5 #ifndef PPAPI_PROXY_DISPATCHER_H_ |
6 #define PPAPI_PROXY_DISPATCHER_H_ | 6 #define PPAPI_PROXY_DISPATCHER_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
86 } | 86 } |
87 | 87 |
88 // Retrieves the information associated with the given interface, identified | 88 // Retrieves the information associated with the given interface, identified |
89 // either by name or ID. Each function searches either PPP or PPB interfaces. | 89 // either by name or ID. Each function searches either PPP or PPB interfaces. |
90 static const InterfaceProxy::Info* GetPPBInterfaceInfo( | 90 static const InterfaceProxy::Info* GetPPBInterfaceInfo( |
91 const std::string& name); | 91 const std::string& name); |
92 static const InterfaceProxy::Info* GetPPBInterfaceInfo( | 92 static const InterfaceProxy::Info* GetPPBInterfaceInfo( |
93 InterfaceID id); | 93 InterfaceID id); |
94 static const InterfaceProxy::Info* GetPPPInterfaceInfo( | 94 static const InterfaceProxy::Info* GetPPPInterfaceInfo( |
95 const std::string& name); | 95 const std::string& name); |
96 static const InterfaceProxy::Info* GetPPPInterfaceInfo( | |
97 InterfaceID id); | |
98 | 96 |
99 protected: | 97 protected: |
100 Dispatcher(base::ProcessHandle remote_process_handle, | 98 Dispatcher(base::ProcessHandle remote_process_handle, |
101 GetInterfaceFunc local_get_interface); | 99 GetInterfaceFunc local_get_interface); |
102 | 100 |
103 // Setter for the derived classes to set the appropriate var serialization. | 101 // Setter for the derived classes to set the appropriate var serialization. |
104 // Takes ownership of the given pointer, which must be on the heap. | 102 // Takes ownership of the given pointer, which must be on the heap. |
105 void SetSerializationRules(VarSerializationRules* var_serialization_rules); | 103 void SetSerializationRules(VarSerializationRules* var_serialization_rules); |
106 | 104 |
107 bool disallow_trusted_interfaces() const { | 105 bool disallow_trusted_interfaces() const { |
108 return disallow_trusted_interfaces_; | 106 return disallow_trusted_interfaces_; |
109 } | 107 } |
110 | 108 |
111 private: | 109 private: |
112 bool disallow_trusted_interfaces_; | 110 bool disallow_trusted_interfaces_; |
113 | 111 |
114 GetInterfaceFunc local_get_interface_; | 112 GetInterfaceFunc local_get_interface_; |
115 | 113 |
116 CallbackTracker callback_tracker_; | 114 CallbackTracker callback_tracker_; |
117 | 115 |
118 scoped_ptr<VarSerializationRules> serialization_rules_; | 116 scoped_ptr<VarSerializationRules> serialization_rules_; |
119 | 117 |
120 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 118 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
121 }; | 119 }; |
122 | 120 |
123 } // namespace proxy | 121 } // namespace proxy |
124 } // namespace pp | 122 } // namespace pp |
125 | 123 |
126 #endif // PPAPI_PROXY_DISPATCHER_H_ | 124 #endif // PPAPI_PROXY_DISPATCHER_H_ |
OLD | NEW |