OLD | NEW |
1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <map> | 8 #include <map> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
48 // InterfaceProxy ----------------------> InterfaceProxy | 48 // InterfaceProxy ----------------------> InterfaceProxy |
49 // | | 49 // | |
50 // | | 50 // | |
51 // "Target" | "Source" | 51 // "Target" | "Source" |
52 // InterfaceProxy <---------------------- InterfaceProxy | 52 // InterfaceProxy <---------------------- InterfaceProxy |
53 // | | 53 // | |
54 class Dispatcher : public IPC::Channel::Listener, | 54 class Dispatcher : public IPC::Channel::Listener, |
55 public IPC::Message::Sender { | 55 public IPC::Message::Sender { |
56 public: | 56 public: |
57 typedef const void* (*GetInterfaceFunc)(const char*); | 57 typedef const void* (*GetInterfaceFunc)(const char*); |
58 typedef const int32_t (*InitModuleFunc)(PP_Module, GetInterfaceFunc); | 58 typedef int32_t (*InitModuleFunc)(PP_Module, GetInterfaceFunc); |
59 typedef const void (*ShutdownModuleFunc)(); | 59 typedef void (*ShutdownModuleFunc)(); |
60 | 60 |
61 ~Dispatcher(); | 61 ~Dispatcher(); |
62 | 62 |
63 bool InitWithChannel(MessageLoop* ipc_message_loop, | 63 bool InitWithChannel(MessageLoop* ipc_message_loop, |
64 const std::string& channel_name, | 64 const std::string& channel_name, |
65 bool is_client, | 65 bool is_client, |
66 base::WaitableEvent* shutdown_event); | 66 base::WaitableEvent* shutdown_event); |
67 | 67 |
68 // Returns true if the dispatcher is on the plugin side, or false if it's the | 68 // Returns true if the dispatcher is on the plugin side, or false if it's the |
69 // browser side. | 69 // browser side. |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
178 | 178 |
179 scoped_ptr<VarSerializationRules> serialization_rules_; | 179 scoped_ptr<VarSerializationRules> serialization_rules_; |
180 | 180 |
181 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 181 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
182 }; | 182 }; |
183 | 183 |
184 } // namespace proxy | 184 } // namespace proxy |
185 } // namespace pp | 185 } // namespace pp |
186 | 186 |
187 #endif // PPAPI_PROXY_DISPATCHER_H_ | 187 #endif // PPAPI_PROXY_DISPATCHER_H_ |
OLD | NEW |