| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 30 matching lines...) Expand all Loading... |
| 41 // | | 41 // | |
| 42 // "Source" | "Target" | 42 // "Source" | "Target" |
| 43 // InterfaceProxy ----------------------> InterfaceProxy | 43 // InterfaceProxy ----------------------> InterfaceProxy |
| 44 // | | 44 // | |
| 45 // | | 45 // | |
| 46 // "Target" | "Source" | 46 // "Target" | "Source" |
| 47 // InterfaceProxy <---------------------- InterfaceProxy | 47 // InterfaceProxy <---------------------- InterfaceProxy |
| 48 // | | 48 // | |
| 49 class PPAPI_PROXY_EXPORT Dispatcher : public ProxyChannel { | 49 class PPAPI_PROXY_EXPORT Dispatcher : public ProxyChannel { |
| 50 public: | 50 public: |
| 51 virtual ~Dispatcher(); | 51 ~Dispatcher() override; |
| 52 | 52 |
| 53 // Returns true if the dispatcher is on the plugin side, or false if it's the | 53 // Returns true if the dispatcher is on the plugin side, or false if it's the |
| 54 // browser side. | 54 // browser side. |
| 55 virtual bool IsPlugin() const = 0; | 55 virtual bool IsPlugin() const = 0; |
| 56 | 56 |
| 57 VarSerializationRules* serialization_rules() const { | 57 VarSerializationRules* serialization_rules() const { |
| 58 return serialization_rules_.get(); | 58 return serialization_rules_.get(); |
| 59 } | 59 } |
| 60 | 60 |
| 61 // Returns a non-owning pointer to the interface proxy for the given ID, or | 61 // Returns a non-owning pointer to the interface proxy for the given ID, or |
| 62 // NULL if the ID isn't found. This will create the proxy if it hasn't been | 62 // NULL if the ID isn't found. This will create the proxy if it hasn't been |
| 63 // created so far. | 63 // created so far. |
| 64 InterfaceProxy* GetInterfaceProxy(ApiID id); | 64 InterfaceProxy* GetInterfaceProxy(ApiID id); |
| 65 | 65 |
| 66 // Adds the given filter to the IO thread. | 66 // Adds the given filter to the IO thread. |
| 67 void AddIOThreadMessageFilter(scoped_refptr<IPC::MessageFilter> filter); | 67 void AddIOThreadMessageFilter(scoped_refptr<IPC::MessageFilter> filter); |
| 68 | 68 |
| 69 // IPC::Listener implementation. | 69 // IPC::Listener implementation. |
| 70 virtual bool OnMessageReceived(const IPC::Message& msg) override; | 70 bool OnMessageReceived(const IPC::Message& msg) override; |
| 71 | 71 |
| 72 PP_GetInterface_Func local_get_interface() const { | 72 PP_GetInterface_Func local_get_interface() const { |
| 73 return local_get_interface_; | 73 return local_get_interface_; |
| 74 } | 74 } |
| 75 | 75 |
| 76 const PpapiPermissions& permissions() const { return permissions_; } | 76 const PpapiPermissions& permissions() const { return permissions_; } |
| 77 | 77 |
| 78 protected: | 78 protected: |
| 79 explicit Dispatcher(PP_GetInterface_Func local_get_interface, | 79 explicit Dispatcher(PP_GetInterface_Func local_get_interface, |
| 80 const PpapiPermissions& permissions); | 80 const PpapiPermissions& permissions); |
| (...skipping 18 matching lines...) Expand all Loading... |
| 99 | 99 |
| 100 PpapiPermissions permissions_; | 100 PpapiPermissions permissions_; |
| 101 | 101 |
| 102 DISALLOW_COPY_AND_ASSIGN(Dispatcher); | 102 DISALLOW_COPY_AND_ASSIGN(Dispatcher); |
| 103 }; | 103 }; |
| 104 | 104 |
| 105 } // namespace proxy | 105 } // namespace proxy |
| 106 } // namespace ppapi | 106 } // namespace ppapi |
| 107 | 107 |
| 108 #endif // PPAPI_PROXY_DISPATCHER_H_ | 108 #endif // PPAPI_PROXY_DISPATCHER_H_ |
| OLD | NEW |