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 #include "remoting/host/it2me/it2me_native_messaging_host.h" | 5 #include "remoting/host/it2me/it2me_native_messaging_host.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/bind.h" | 10 #include "base/bind.h" |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 | 43 |
44 It2MeNativeMessagingHost::It2MeNativeMessagingHost( | 44 It2MeNativeMessagingHost::It2MeNativeMessagingHost( |
45 scoped_ptr<ChromotingHostContext> context, | 45 scoped_ptr<ChromotingHostContext> context, |
46 scoped_ptr<It2MeHostFactory> factory) | 46 scoped_ptr<It2MeHostFactory> factory) |
47 : client_(nullptr), | 47 : client_(nullptr), |
48 host_context_(context.Pass()), | 48 host_context_(context.Pass()), |
49 factory_(factory.Pass()), | 49 factory_(factory.Pass()), |
50 weak_factory_(this) { | 50 weak_factory_(this) { |
51 weak_ptr_ = weak_factory_.GetWeakPtr(); | 51 weak_ptr_ = weak_factory_.GetWeakPtr(); |
52 | 52 |
53 // Ensures runtime specific CPU features are initialized. | 53 // Ensures that media library and specific CPU features are initialized. |
54 media::InitializeCPUSpecificMediaFeatures(); | 54 media::InitializeMediaLibrary(); |
55 | 55 |
56 const ServiceUrls* service_urls = ServiceUrls::GetInstance(); | 56 const ServiceUrls* service_urls = ServiceUrls::GetInstance(); |
57 const bool xmpp_server_valid = | 57 const bool xmpp_server_valid = |
58 net::ParseHostAndPort(service_urls->xmpp_server_address(), | 58 net::ParseHostAndPort(service_urls->xmpp_server_address(), |
59 &xmpp_server_config_.host, | 59 &xmpp_server_config_.host, |
60 &xmpp_server_config_.port); | 60 &xmpp_server_config_.port); |
61 DCHECK(xmpp_server_valid); | 61 DCHECK(xmpp_server_valid); |
62 | 62 |
63 xmpp_server_config_.use_tls = service_urls->xmpp_server_use_tls(); | 63 xmpp_server_config_.use_tls = service_urls->xmpp_server_use_tls(); |
64 directory_bot_jid_ = service_urls->directory_bot_jid(); | 64 directory_bot_jid_ = service_urls->directory_bot_jid(); |
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
309 } | 309 } |
310 | 310 |
311 /* static */ | 311 /* static */ |
312 std::string It2MeNativeMessagingHost::HostStateToString( | 312 std::string It2MeNativeMessagingHost::HostStateToString( |
313 It2MeHostState host_state) { | 313 It2MeHostState host_state) { |
314 return ValueToName(kIt2MeHostStates, host_state); | 314 return ValueToName(kIt2MeHostStates, host_state); |
315 } | 315 } |
316 | 316 |
317 } // namespace remoting | 317 } // namespace remoting |
318 | 318 |
OLD | NEW |