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 <memory> |
| 6 |
5 #include "base/callback.h" | 7 #include "base/callback.h" |
6 #include "base/macros.h" | 8 #include "base/macros.h" |
7 #include "base/memory/scoped_ptr.h" | |
8 #include "base/memory/weak_ptr.h" | 9 #include "base/memory/weak_ptr.h" |
9 #include "ppapi/c/pp_instance.h" | 10 #include "ppapi/c/pp_instance.h" |
10 #include "ppapi/proxy/connection.h" | 11 #include "ppapi/proxy/connection.h" |
11 #include "ppapi/proxy/resource_message_params.h" | 12 #include "ppapi/proxy/resource_message_params.h" |
12 | 13 |
13 namespace IPC { | 14 namespace IPC { |
14 class Message; | 15 class Message; |
15 class MessageReplyDeserializer; | 16 class MessageReplyDeserializer; |
16 } // namespace | 17 } // namespace |
17 | 18 |
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 private: | 72 private: |
72 bool SendToHost(IPC::Message* msg); | 73 bool SendToHost(IPC::Message* msg); |
73 bool SendToPlugin(IPC::Message* msg); | 74 bool SendToPlugin(IPC::Message* msg); |
74 void DispatchHostMsg(IPC::Message* msg); | 75 void DispatchHostMsg(IPC::Message* msg); |
75 void DispatchPluginMsg(IPC::Message* msg); | 76 void DispatchPluginMsg(IPC::Message* msg); |
76 bool SendToBrowser(IPC::Message* msg); | 77 bool SendToBrowser(IPC::Message* msg); |
77 | 78 |
78 RendererPpapiHostImpl* host_impl_; | 79 RendererPpapiHostImpl* host_impl_; |
79 | 80 |
80 class Channel; | 81 class Channel; |
81 scoped_ptr<Channel> browser_channel_; | 82 std::unique_ptr<Channel> browser_channel_; |
82 | 83 |
83 // Renderer -> plugin channel. | 84 // Renderer -> plugin channel. |
84 scoped_ptr<Channel> host_to_plugin_router_; | 85 std::unique_ptr<Channel> host_to_plugin_router_; |
85 | 86 |
86 // Plugin -> renderer channel. | 87 // Plugin -> renderer channel. |
87 scoped_ptr<Channel> plugin_to_host_router_; | 88 std::unique_ptr<Channel> plugin_to_host_router_; |
88 | 89 |
89 // Pending sync message id. | 90 // Pending sync message id. |
90 int pending_message_id_; | 91 int pending_message_id_; |
91 | 92 |
92 // Reply deserializer of the pending sync message. | 93 // Reply deserializer of the pending sync message. |
93 scoped_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; | 94 std::unique_ptr<IPC::MessageReplyDeserializer> reply_deserializer_; |
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 |