| 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 WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_ | 5 #ifndef WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_ |
| 6 #define WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_ | 6 #define WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_ |
| 7 | 7 |
| 8 #include "base/task.h" | 8 #include "base/task.h" |
| 9 #include "third_party/npapi/bindings/npruntime.h" | 9 #include "third_party/npapi/bindings/npruntime.h" |
| 10 #include "webkit/plugins/ppapi/resource.h" | 10 #include "webkit/plugins/ppapi/resource.h" |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 52 // channel's instance. | 52 // channel's instance. |
| 53 void PostMessageToNative(PP_Var message_data); | 53 void PostMessageToNative(PP_Var message_data); |
| 54 | 54 |
| 55 // Return the NPObject* to which we should forward any calls which aren't | 55 // Return the NPObject* to which we should forward any calls which aren't |
| 56 // related to postMessage. Note that this can be NULL; it only gets set if | 56 // related to postMessage. Note that this can be NULL; it only gets set if |
| 57 // there is a scriptable 'InstanceObject' associated with this channel's | 57 // there is a scriptable 'InstanceObject' associated with this channel's |
| 58 // instance. | 58 // instance. |
| 59 NPObject* passthrough_object() { | 59 NPObject* passthrough_object() { |
| 60 return passthrough_object_; | 60 return passthrough_object_; |
| 61 } | 61 } |
| 62 void set_passthrough_object(NPObject* passthrough) { | 62 void SetPassthroughObject(NPObject* passthrough); |
| 63 passthrough_object_ = passthrough; | |
| 64 } | |
| 65 | 63 |
| 66 NPObject* np_object() { return np_object_; } | 64 NPObject* np_object() { return np_object_; } |
| 67 | 65 |
| 68 PluginInstance* instance() { | 66 PluginInstance* instance() { |
| 69 return instance_; | 67 return instance_; |
| 70 } | 68 } |
| 71 | 69 |
| 72 private: | 70 private: |
| 73 PluginInstance* instance_; | 71 PluginInstance* instance_; |
| 74 | 72 |
| (...skipping 27 matching lines...) Expand all Loading... |
| 102 ScopedRunnableMethodFactory<MessageChannel> method_factory_; | 100 ScopedRunnableMethodFactory<MessageChannel> method_factory_; |
| 103 | 101 |
| 104 DISALLOW_COPY_AND_ASSIGN(MessageChannel); | 102 DISALLOW_COPY_AND_ASSIGN(MessageChannel); |
| 105 }; | 103 }; |
| 106 | 104 |
| 107 } // namespace ppapi | 105 } // namespace ppapi |
| 108 } // namespace webkit | 106 } // namespace webkit |
| 109 | 107 |
| 110 #endif // WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_ | 108 #endif // WEBKIT_PLUGINS_PPAPI_MESSAGE_CHANNEL_H_ |
| 111 | 109 |
| OLD | NEW |