| 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 #include "base/callback.h" | 5 #include "base/callback.h" |
| 6 #include "base/basictypes.h" | 6 #include "base/basictypes.h" |
| 7 #include "base/memory/scoped_ptr.h" | 7 #include "base/memory/scoped_ptr.h" |
| 8 #include "base/memory/weak_ptr.h" | 8 #include "base/memory/weak_ptr.h" |
| 9 #include "ppapi/c/pp_instance.h" |
| 9 #include "ppapi/proxy/connection.h" | 10 #include "ppapi/proxy/connection.h" |
| 10 #include "ppapi/proxy/resource_message_params.h" | 11 #include "ppapi/proxy/resource_message_params.h" |
| 11 | 12 |
| 12 namespace IPC { | 13 namespace IPC { |
| 13 class Message; | 14 class Message; |
| 14 class MessageReplyDeserializer; | 15 class MessageReplyDeserializer; |
| 15 } // namespace | 16 } // namespace |
| 16 | 17 |
| 17 namespace content { | 18 namespace content { |
| 18 | 19 |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 ~PepperInProcessRouter(); | 56 ~PepperInProcessRouter(); |
| 56 | 57 |
| 57 // Returns the dummy sender for the cooresponding end of the in-process | 58 // Returns the dummy sender for the cooresponding end of the in-process |
| 58 // emulated channel. | 59 // emulated channel. |
| 59 IPC::Sender* GetPluginToRendererSender(); | 60 IPC::Sender* GetPluginToRendererSender(); |
| 60 IPC::Sender* GetRendererToPluginSender(); | 61 IPC::Sender* GetRendererToPluginSender(); |
| 61 | 62 |
| 62 // Returns a connection pair for use by a resource proxy. This includes | 63 // Returns a connection pair for use by a resource proxy. This includes |
| 63 // the plugin->renderer sender as well as a dummy sender to the browser | 64 // the plugin->renderer sender as well as a dummy sender to the browser |
| 64 // process. See the class comment above about the dummy sender. | 65 // process. See the class comment above about the dummy sender. |
| 65 ppapi::proxy::Connection GetPluginConnection(); | 66 ppapi::proxy::Connection GetPluginConnection(PP_Instance instance); |
| 66 | 67 |
| 67 private: | 68 private: |
| 68 bool SendToHost(IPC::Message *msg); | 69 bool SendToHost(IPC::Message *msg); |
| 69 bool SendToPlugin(IPC::Message *msg); | 70 bool SendToPlugin(IPC::Message *msg); |
| 70 void DispatchPluginMsg(IPC::Message* msg); | 71 void DispatchPluginMsg(IPC::Message* msg); |
| 71 bool DummySendTo(IPC::Message *msg); | 72 bool DummySendTo(IPC::Message *msg); |
| 72 | 73 |
| 73 // Handles resource reply messages from the host. | 74 // Handles resource reply messages from the host. |
| 74 void OnResourceReply( | 75 void OnResourceReply( |
| 75 const ppapi::proxy::ResourceMessageReplyParams& reply_params, | 76 const ppapi::proxy::ResourceMessageReplyParams& reply_params, |
| (...skipping 18 matching lines...) Expand all Loading... |
| 94 | 95 |
| 95 // Reply result of the pending sync message. | 96 // Reply result of the pending sync message. |
| 96 bool reply_result_; | 97 bool reply_result_; |
| 97 | 98 |
| 98 base::WeakPtrFactory<PepperInProcessRouter> weak_factory_; | 99 base::WeakPtrFactory<PepperInProcessRouter> weak_factory_; |
| 99 | 100 |
| 100 DISALLOW_COPY_AND_ASSIGN(PepperInProcessRouter); | 101 DISALLOW_COPY_AND_ASSIGN(PepperInProcessRouter); |
| 101 }; | 102 }; |
| 102 | 103 |
| 103 } // namespace content | 104 } // namespace content |
| OLD | NEW |