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 CONTENT_PLUGIN_PLUGIN_CHANNEL_BASE_H_ | 5 #ifndef CONTENT_PLUGIN_PLUGIN_CHANNEL_BASE_H_ |
6 #define CONTENT_PLUGIN_PLUGIN_CHANNEL_BASE_H_ | 6 #define CONTENT_PLUGIN_PLUGIN_CHANNEL_BASE_H_ |
7 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <string> | 9 #include <string> |
10 | 10 |
(...skipping 110 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
121 | 121 |
122 // Called on the worker thread | 122 // Called on the worker thread |
123 PluginChannelBase(); | 123 PluginChannelBase(); |
124 | 124 |
125 virtual void CleanUp() { } | 125 virtual void CleanUp() { } |
126 | 126 |
127 // Implemented by derived classes to handle control messages | 127 // Implemented by derived classes to handle control messages |
128 virtual bool OnControlMessageReceived(const IPC::Message& msg); | 128 virtual bool OnControlMessageReceived(const IPC::Message& msg); |
129 | 129 |
130 // IPC::Channel::Listener implementation: | 130 // IPC::Channel::Listener implementation: |
131 virtual bool OnMessageReceived(const IPC::Message& msg); | 131 virtual bool OnMessageReceived(const IPC::Message& msg) OVERRIDE; |
132 virtual void OnChannelConnected(int32 peer_pid); | 132 virtual void OnChannelConnected(int32 peer_pid) OVERRIDE; |
133 virtual void OnChannelError(); | 133 virtual void OnChannelError() OVERRIDE; |
134 | 134 |
135 void set_send_unblocking_only_during_unblock_dispatch() { | 135 void set_send_unblocking_only_during_unblock_dispatch() { |
136 send_unblocking_only_during_unblock_dispatch_ = true; | 136 send_unblocking_only_during_unblock_dispatch_ = true; |
137 } | 137 } |
138 | 138 |
139 virtual bool Init(base::MessageLoopProxy* ipc_message_loop, | 139 virtual bool Init(base::MessageLoopProxy* ipc_message_loop, |
140 bool create_pipe_now); | 140 bool create_pipe_now); |
141 | 141 |
142 scoped_ptr<IPC::SyncChannel> channel_; | 142 scoped_ptr<IPC::SyncChannel> channel_; |
143 | 143 |
(...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
183 // renderer. We additionally have to do this for async messages from the | 183 // renderer. We additionally have to do this for async messages from the |
184 // renderer that have the unblock flag set, since they could be followed by a | 184 // renderer that have the unblock flag set, since they could be followed by a |
185 // sync message that won't get dispatched until the call to the renderer is | 185 // sync message that won't get dispatched until the call to the renderer is |
186 // complete. | 186 // complete. |
187 bool send_unblocking_only_during_unblock_dispatch_; | 187 bool send_unblocking_only_during_unblock_dispatch_; |
188 | 188 |
189 DISALLOW_COPY_AND_ASSIGN(PluginChannelBase); | 189 DISALLOW_COPY_AND_ASSIGN(PluginChannelBase); |
190 }; | 190 }; |
191 | 191 |
192 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_BASE_H_ | 192 #endif // CONTENT_PLUGIN_PLUGIN_CHANNEL_BASE_H_ |
OLD | NEW |