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 #include "remoting/host/cast_extension_session.h" | 5 #include "remoting/host/cast_extension_session.h" |
6 | 6 |
7 #include <utility> | 7 #include <utility> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/json/json_reader.h" | 10 #include "base/json/json_reader.h" |
11 #include "base/json/json_writer.h" | 11 #include "base/json/json_writer.h" |
12 #include "base/logging.h" | 12 #include "base/logging.h" |
13 #include "base/macros.h" | 13 #include "base/macros.h" |
14 #include "base/synchronization/waitable_event.h" | 14 #include "base/synchronization/waitable_event.h" |
15 #include "base/thread_task_runner_handle.h" | 15 #include "base/thread_task_runner_handle.h" |
16 #include "remoting/host/client_session.h" | 16 #include "remoting/host/client_session.h" |
17 #include "remoting/proto/control.pb.h" | 17 #include "remoting/proto/control.pb.h" |
18 #include "remoting/protocol/client_stub.h" | 18 #include "remoting/protocol/client_stub.h" |
19 #include "remoting/protocol/port_allocator_factory.h" | 19 #include "remoting/protocol/port_allocator_factory.h" |
20 #include "remoting/protocol/transport_context.h" | 20 #include "remoting/protocol/transport_context.h" |
21 #include "remoting/protocol/webrtc_video_capturer_adapter.h" | 21 #include "remoting/protocol/webrtc_video_capturer_adapter.h" |
22 #include "third_party/webrtc/api/mediastreaminterface.h" | 22 #include "third_party/webrtc/api/mediastreaminterface.h" |
23 #include "third_party/webrtc/api/test/fakeconstraints.h" | 23 #include "third_party/webrtc/api/test/fakeconstraints.h" |
24 #include "third_party/webrtc/api/videosourceinterface.h" | |
25 | 24 |
26 namespace remoting { | 25 namespace remoting { |
27 | 26 |
28 // Used as the type attribute of all Cast protocol::ExtensionMessages. | 27 // Used as the type attribute of all Cast protocol::ExtensionMessages. |
29 const char kExtensionMessageType[] = "cast_message"; | 28 const char kExtensionMessageType[] = "cast_message"; |
30 | 29 |
31 // Top-level keys used in all extension messages between host and client. | 30 // Top-level keys used in all extension messages between host and client. |
32 // Must keep synced with webapp. | 31 // Must keep synced with webapp. |
33 const char kTopLevelData[] = "chromoting_data"; | 32 const char kTopLevelData[] = "chromoting_data"; |
34 const char kTopLevelSubject[] = "subject"; | 33 const char kTopLevelSubject[] = "subject"; |
(...skipping 596 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
631 json.SetString(kWebRtcCandidate, candidate_str); | 630 json.SetString(kWebRtcCandidate, candidate_str); |
632 std::string json_str; | 631 std::string json_str; |
633 if (!base::JSONWriter::Write(json, &json_str)) { | 632 if (!base::JSONWriter::Write(json, &json_str)) { |
634 LOG(ERROR) << "Failed to serialize candidate message."; | 633 LOG(ERROR) << "Failed to serialize candidate message."; |
635 return; | 634 return; |
636 } | 635 } |
637 SendMessageToClient(kSubjectNewCandidate, json_str); | 636 SendMessageToClient(kSubjectNewCandidate, json_str); |
638 } | 637 } |
639 | 638 |
640 } // namespace remoting | 639 } // namespace remoting |
OLD | NEW |