| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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_CHILD_NPAPI_NP_CHANNEL_BASE_H_ | 5 #ifndef CONTENT_CHILD_NPAPI_NP_CHANNEL_BASE_H_ |
| 6 #define CONTENT_CHILD_NPAPI_NP_CHANNEL_BASE_H_ | 6 #define CONTENT_CHILD_NPAPI_NP_CHANNEL_BASE_H_ |
| 7 | 7 |
| 8 #include <stdint.h> |
| 9 |
| 8 #include <string> | 10 #include <string> |
| 9 | 11 |
| 10 #include "base/basictypes.h" | |
| 11 #include "base/containers/hash_tables.h" | 12 #include "base/containers/hash_tables.h" |
| 13 #include "base/macros.h" |
| 12 #include "base/memory/ref_counted.h" | 14 #include "base/memory/ref_counted.h" |
| 13 #include "base/memory/scoped_ptr.h" | 15 #include "base/memory/scoped_ptr.h" |
| 14 #include "base/process/process.h" | 16 #include "base/process/process.h" |
| 15 #include "content/child/npapi/npobject_base.h" | 17 #include "content/child/npapi/npobject_base.h" |
| 16 #include "content/common/message_router.h" | 18 #include "content/common/message_router.h" |
| 17 #include "ipc/ipc_channel_handle.h" | 19 #include "ipc/ipc_channel_handle.h" |
| 18 #include "ipc/ipc_sync_channel.h" | 20 #include "ipc/ipc_sync_channel.h" |
| 19 | 21 |
| 20 namespace base { | 22 namespace base { |
| 21 class SingleThreadTaskRunner; | 23 class SingleThreadTaskRunner; |
| (...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 113 // Called on the worker thread | 115 // Called on the worker thread |
| 114 NPChannelBase(); | 116 NPChannelBase(); |
| 115 | 117 |
| 116 virtual void CleanUp() { } | 118 virtual void CleanUp() { } |
| 117 | 119 |
| 118 // Implemented by derived classes to handle control messages | 120 // Implemented by derived classes to handle control messages |
| 119 virtual bool OnControlMessageReceived(const IPC::Message& msg); | 121 virtual bool OnControlMessageReceived(const IPC::Message& msg); |
| 120 | 122 |
| 121 // IPC::Listener implementation: | 123 // IPC::Listener implementation: |
| 122 bool OnMessageReceived(const IPC::Message& msg) override; | 124 bool OnMessageReceived(const IPC::Message& msg) override; |
| 123 void OnChannelConnected(int32 peer_pid) override; | 125 void OnChannelConnected(int32_t peer_pid) override; |
| 124 void OnChannelError() override; | 126 void OnChannelError() override; |
| 125 | 127 |
| 126 void set_send_unblocking_only_during_unblock_dispatch() { | 128 void set_send_unblocking_only_during_unblock_dispatch() { |
| 127 send_unblocking_only_during_unblock_dispatch_ = true; | 129 send_unblocking_only_during_unblock_dispatch_ = true; |
| 128 } | 130 } |
| 129 | 131 |
| 130 virtual bool Init(base::SingleThreadTaskRunner* ipc_task_runner, | 132 virtual bool Init(base::SingleThreadTaskRunner* ipc_task_runner, |
| 131 bool create_pipe_now, | 133 bool create_pipe_now, |
| 132 base::WaitableEvent* shutdown_event); | 134 base::WaitableEvent* shutdown_event); |
| 133 | 135 |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 189 // have the unblock flag set, since they could be followed by a sync message | 191 // have the unblock flag set, since they could be followed by a sync message |
| 190 // that won't get dispatched until the call to the renderer is complete. | 192 // that won't get dispatched until the call to the renderer is complete. |
| 191 bool send_unblocking_only_during_unblock_dispatch_; | 193 bool send_unblocking_only_during_unblock_dispatch_; |
| 192 | 194 |
| 193 DISALLOW_COPY_AND_ASSIGN(NPChannelBase); | 195 DISALLOW_COPY_AND_ASSIGN(NPChannelBase); |
| 194 }; | 196 }; |
| 195 | 197 |
| 196 } // namespace content | 198 } // namespace content |
| 197 | 199 |
| 198 #endif // CONTENT_CHILD_NPAPI_NP_CHANNEL_BASE_H_ | 200 #endif // CONTENT_CHILD_NPAPI_NP_CHANNEL_BASE_H_ |
| OLD | NEW |