| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 REMOTING_HOST_CAST_EXTENSION_SESSION_H_ | 5 #ifndef REMOTING_HOST_CAST_EXTENSION_SESSION_H_ |
| 6 #define REMOTING_HOST_CAST_EXTENSION_SESSION_H_ | 6 #define REMOTING_HOST_CAST_EXTENSION_SESSION_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/memory/ref_counted.h" | 10 #include "base/memory/ref_counted.h" |
| (...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 148 // "candidate" : "...", | 148 // "candidate" : "...", |
| 149 // "sdpMid" : "...", | 149 // "sdpMid" : "...", |
| 150 // "sdpMLineIndex" : "..." | 150 // "sdpMLineIndex" : "..." |
| 151 // } | 151 // } |
| 152 // } | 152 // } |
| 153 // | 153 // |
| 154 bool SendMessageToClient(const std::string& subject, const std::string& data); | 154 bool SendMessageToClient(const std::string& subject, const std::string& data); |
| 155 | 155 |
| 156 // Creates the jingle wrapper for the current thread, sets send to allowed, | 156 // Creates the jingle wrapper for the current thread, sets send to allowed, |
| 157 // and saves a pointer to the relevant thread pointer in ptr. If |event| | 157 // and saves a pointer to the relevant thread pointer in ptr. If |event| |
| 158 // is not NULL, signals the event on completion. | 158 // is not nullptr, signals the event on completion. |
| 159 void EnsureTaskAndSetSend(rtc::Thread** ptr, | 159 void EnsureTaskAndSetSend(rtc::Thread** ptr, |
| 160 base::WaitableEvent* event = NULL); | 160 base::WaitableEvent* event = nullptr); |
| 161 | 161 |
| 162 // Wraps each task runner in JingleThreadWrapper using EnsureTaskAndSetSend(), | 162 // Wraps each task runner in JingleThreadWrapper using EnsureTaskAndSetSend(), |
| 163 // returning true if successful. Wrapping the task runners allows them to be | 163 // returning true if successful. Wrapping the task runners allows them to be |
| 164 // shared with and used by the (about to be created) PeerConnectionFactory. | 164 // shared with and used by the (about to be created) PeerConnectionFactory. |
| 165 bool WrapTasksAndSave(); | 165 bool WrapTasksAndSave(); |
| 166 | 166 |
| 167 // Initializes PeerConnectionFactory and PeerConnection and sends a "ready" | 167 // Initializes PeerConnectionFactory and PeerConnection and sends a "ready" |
| 168 // message to client. Returns true if these steps are performed successfully. | 168 // message to client. Returns true if these steps are performed successfully. |
| 169 bool InitializePeerConnection(); | 169 bool InitializePeerConnection(); |
| 170 | 170 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 232 | 232 |
| 233 // Worker thread that is wrapped to create |worker_thread_wrapper_|. | 233 // Worker thread that is wrapped to create |worker_thread_wrapper_|. |
| 234 base::Thread worker_thread_; | 234 base::Thread worker_thread_; |
| 235 | 235 |
| 236 DISALLOW_COPY_AND_ASSIGN(CastExtensionSession); | 236 DISALLOW_COPY_AND_ASSIGN(CastExtensionSession); |
| 237 }; | 237 }; |
| 238 | 238 |
| 239 } // namespace remoting | 239 } // namespace remoting |
| 240 | 240 |
| 241 #endif // REMOTING_HOST_CAST_EXTENSION_SESSION_H_ | 241 #endif // REMOTING_HOST_CAST_EXTENSION_SESSION_H_ |
| OLD | NEW |