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_INTERFACE_PROXY_H_ | 5 #ifndef PPAPI_PROXY_INTERFACE_PROXY_H_ |
6 #define PPAPI_PROXY_INTERFACE_PROXY_H_ | 6 #define PPAPI_PROXY_INTERFACE_PROXY_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "ipc/ipc_channel.h" | 9 #include "ipc/ipc_channel.h" |
10 #include "ipc/ipc_message.h" | 10 #include "ipc/ipc_message.h" |
(...skipping 27 matching lines...) Expand all Loading... |
38 bool is_target_proxy() const { return !!target_interface_; } | 38 bool is_target_proxy() const { return !!target_interface_; } |
39 | 39 |
40 // When this proxy is the "target" of the IPC communication (see | 40 // When this proxy is the "target" of the IPC communication (see |
41 // dispatcher.h), this target_interface pointer will indicate the local | 41 // dispatcher.h), this target_interface pointer will indicate the local |
42 // side's interface pointer. This contains the functions that actually | 42 // side's interface pointer. This contains the functions that actually |
43 // implement the proxied interface. | 43 // implement the proxied interface. |
44 // | 44 // |
45 // This will be NULL when this proxy is a source proxy. | 45 // This will be NULL when this proxy is a source proxy. |
46 const void* target_interface() const { return target_interface_; } | 46 const void* target_interface() const { return target_interface_; } |
47 | 47 |
48 Dispatcher* dispatcher() { return dispatcher_; } | 48 Dispatcher* dispatcher() const { return dispatcher_; } |
49 | 49 |
50 // IPC::Message::Sender implementation. | 50 // IPC::Message::Sender implementation. |
51 virtual bool Send(IPC::Message* msg); | 51 virtual bool Send(IPC::Message* msg); |
52 | 52 |
53 // Returns the local implementation of the interface that will proxy it to | 53 // Returns the local implementation of the interface that will proxy it to |
54 // the remote side. This is used on the source side only (see dispatcher.h). | 54 // the remote side. This is used on the source side only (see dispatcher.h). |
55 virtual const void* GetSourceInterface() const = 0; | 55 virtual const void* GetSourceInterface() const = 0; |
56 | 56 |
57 // Returns the interface ID associated with this proxy. Implemented by each | 57 // Returns the interface ID associated with this proxy. Implemented by each |
58 // derived class to identify itself. | 58 // derived class to identify itself. |
(...skipping 17 matching lines...) Expand all Loading... |
76 | 76 |
77 inline bool PPBoolToBool(PP_Bool value) { | 77 inline bool PPBoolToBool(PP_Bool value) { |
78 return (PP_TRUE == value); | 78 return (PP_TRUE == value); |
79 } | 79 } |
80 | 80 |
81 } // namespace proxy | 81 } // namespace proxy |
82 } // namespace pp | 82 } // namespace pp |
83 | 83 |
84 #endif // PPAPI_PROXY_INTERFACE_PROXY_H_ | 84 #endif // PPAPI_PROXY_INTERFACE_PROXY_H_ |
85 | 85 |
OLD | NEW |