| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 "blimp/client/session/blimp_client_session_linux.h" | 5 #include "blimp/client/session/blimp_client_session_linux.h" |
| 6 | 6 |
| 7 #include "base/message_loop/message_loop.h" | 7 #include "base/message_loop/message_loop.h" |
| 8 #include "blimp/client/linux/blimp_display_manager.h" | 8 #include "blimp/client/linux/blimp_display_manager.h" |
| 9 #include "blimp/net/client_connection_manager.h" |
| 10 #include "blimp/net/common.h" |
| 11 #include "blimp/net/tcp_client_transport.h" |
| 12 #include "net/base/address_list.h" |
| 13 #include "net/base/ip_address_number.h" |
| 14 #include "net/base/ip_endpoint.h" |
| 9 #include "ui/events/platform/platform_event_source.h" | 15 #include "ui/events/platform/platform_event_source.h" |
| 10 #include "ui/gfx/geometry/size.h" | 16 #include "ui/gfx/geometry/size.h" |
| 11 | 17 |
| 12 namespace blimp { | 18 namespace blimp { |
| 13 | 19 |
| 14 BlimpClientSessionLinux::BlimpClientSessionLinux() | 20 BlimpClientSessionLinux::BlimpClientSessionLinux() |
| 15 : event_source_(ui::PlatformEventSource::CreateDefault()) { | 21 : event_source_(ui::PlatformEventSource::CreateDefault()) { |
| 16 blimp_display_manager_.reset(new BlimpDisplayManager(gfx::Size(800, 600), | 22 blimp_display_manager_.reset(new BlimpDisplayManager(gfx::Size(800, 600), |
| 17 this, | 23 this, |
| 18 GetRenderWidgetFeature(), | 24 GetRenderWidgetFeature(), |
| 19 GetTabControlFeature())); | 25 GetTabControlFeature())); |
| 26 // TODO(kmarshall): Use config data for endpoints. |
| 27 GetConnectionManager()->AddTransport(make_scoped_ptr(new TCPClientTransport( |
| 28 net::AddressList(net::IPEndPoint(GetIPV4AnyAddress(), kDefaultTcpPort)), |
| 29 nullptr))); |
| 20 } | 30 } |
| 21 | 31 |
| 22 BlimpClientSessionLinux::~BlimpClientSessionLinux() {} | 32 BlimpClientSessionLinux::~BlimpClientSessionLinux() {} |
| 23 | 33 |
| 24 void BlimpClientSessionLinux::OnClosed() { | 34 void BlimpClientSessionLinux::OnClosed() { |
| 25 base::MessageLoop::current()->QuitNow(); | 35 base::MessageLoop::current()->QuitNow(); |
| 26 } | 36 } |
| 27 | 37 |
| 28 } // namespace blimp | 38 } // namespace blimp |
| OLD | NEW |