| 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/engine/session/blimp_engine_session.h" | 5 #include "blimp/engine/session/blimp_engine_session.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 211 connection_manager_ = base::MakeUnique<EngineConnectionManager>( | 211 connection_manager_ = base::MakeUnique<EngineConnectionManager>( |
| 212 authentication_handler_.get(), net_log_); | 212 authentication_handler_.get(), net_log_); |
| 213 | 213 |
| 214 blob_channel_service_ = | 214 blob_channel_service_ = |
| 215 base::MakeUnique<BlobChannelService>(blob_channel_sender, ui_task_runner); | 215 base::MakeUnique<BlobChannelService>(blob_channel_sender, ui_task_runner); |
| 216 | 216 |
| 217 // Adds BlimpTransports to connection_manager_. | 217 // Adds BlimpTransports to connection_manager_. |
| 218 net::IPEndPoint address(GetListeningAddress(), GetListeningPort()); | 218 net::IPEndPoint address(GetListeningAddress(), GetListeningPort()); |
| 219 connection_manager_->ConnectTransport(&address, GetTransportType()); | 219 connection_manager_->ConnectTransport(&address, GetTransportType()); |
| 220 port_ = address.port(); | 220 port_ = address.port(); |
| 221 |
| 222 // Print the engine port for client_engine_integration script, please do not |
| 223 // remove this log. |
| 224 DVLOG(1) << "Engine port #: " << port_; |
| 221 } | 225 } |
| 222 | 226 |
| 223 void EngineNetworkComponents::HandleConnection( | 227 void EngineNetworkComponents::HandleConnection( |
| 224 std::unique_ptr<BlimpConnection> connection) { | 228 std::unique_ptr<BlimpConnection> connection) { |
| 225 // Observe |connection| for disconnection events. | 229 // Observe |connection| for disconnection events. |
| 226 connection->AddConnectionErrorObserver(this); | 230 connection->AddConnectionErrorObserver(this); |
| 227 connection_handler_.HandleConnection(std::move(connection)); | 231 connection_handler_.HandleConnection(std::move(connection)); |
| 228 } | 232 } |
| 229 | 233 |
| 230 void EngineNetworkComponents::OnConnectionError(int error) { | 234 void EngineNetworkComponents::OnConnectionError(int error) { |
| (...skipping 350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 581 parent->AddChild(content); | 585 parent->AddChild(content); |
| 582 content->Show(); | 586 content->Show(); |
| 583 | 587 |
| 584 tab_ = base::MakeUnique<Tab>(std::move(new_contents), target_tab_id, | 588 tab_ = base::MakeUnique<Tab>(std::move(new_contents), target_tab_id, |
| 585 &render_widget_feature_, | 589 &render_widget_feature_, |
| 586 navigation_message_sender_.get()); | 590 navigation_message_sender_.get()); |
| 587 } | 591 } |
| 588 | 592 |
| 589 } // namespace engine | 593 } // namespace engine |
| 590 } // namespace blimp | 594 } // namespace blimp |
| OLD | NEW |