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.h" | 5 #include "remoting/host/cast_extension.h" |
6 | 6 |
7 #include "net/url_request/url_request_context_getter.h" | 7 #include "net/url_request/url_request_context_getter.h" |
8 #include "remoting/host/cast_extension_session.h" | 8 #include "remoting/host/cast_extension_session.h" |
9 #include "remoting/protocol/network_settings.h" | 9 #include "remoting/protocol/transport_context.h" |
10 | 10 |
11 namespace remoting { | 11 namespace remoting { |
12 | 12 |
13 const char kCapability[] = "casting"; | 13 const char kCapability[] = "casting"; |
14 | 14 |
15 CastExtension::CastExtension( | 15 CastExtension::CastExtension( |
16 scoped_refptr<base::SingleThreadTaskRunner> network_task_runner, | 16 scoped_refptr<protocol::TransportContext> transport_context) |
17 scoped_refptr<net::URLRequestContextGetter> url_request_context_getter, | 17 : transport_context_(transport_context) {} |
18 const protocol::NetworkSettings& network_settings) | |
19 : network_task_runner_(network_task_runner), | |
20 url_request_context_getter_(url_request_context_getter), | |
21 network_settings_(network_settings) { | |
22 } | |
23 | 18 |
24 CastExtension::~CastExtension() { | 19 CastExtension::~CastExtension() {} |
25 } | |
26 | 20 |
27 std::string CastExtension::capability() const { | 21 std::string CastExtension::capability() const { |
28 return kCapability; | 22 return kCapability; |
29 } | 23 } |
30 | 24 |
31 scoped_ptr<HostExtensionSession> CastExtension::CreateExtensionSession( | 25 scoped_ptr<HostExtensionSession> CastExtension::CreateExtensionSession( |
32 ClientSessionControl* client_session_control, | 26 ClientSessionControl* client_session_control, |
33 protocol::ClientStub* client_stub) { | 27 protocol::ClientStub* client_stub) { |
34 return CastExtensionSession::Create( | 28 return CastExtensionSession::Create(transport_context_, |
35 network_task_runner_, url_request_context_getter_, network_settings_, | 29 client_session_control, client_stub); |
36 client_session_control, client_stub); | |
37 } | 30 } |
38 | 31 |
39 } // namespace remoting | 32 } // namespace remoting |
40 | 33 |
OLD | NEW |