| 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 169 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 180 base::WeakPtr<BlobChannelSender> blob_channel_sender, | 180 base::WeakPtr<BlobChannelSender> blob_channel_sender, |
| 181 const std::string& client_token) { | 181 const std::string& client_token) { |
| 182 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); | 182 DCHECK_CURRENTLY_ON(content::BrowserThread::IO); |
| 183 DCHECK(!connection_manager_); | 183 DCHECK(!connection_manager_); |
| 184 // Plumb authenticated connections from the authentication handler | 184 // Plumb authenticated connections from the authentication handler |
| 185 // to |this| (which will then pass it to |connection_handler_|. | 185 // to |this| (which will then pass it to |connection_handler_|. |
| 186 authentication_handler_ = | 186 authentication_handler_ = |
| 187 base::MakeUnique<EngineAuthenticationHandler>(this, client_token); | 187 base::MakeUnique<EngineAuthenticationHandler>(this, client_token); |
| 188 | 188 |
| 189 // Plumb unauthenticated connections to |authentication_handler_|. | 189 // Plumb unauthenticated connections to |authentication_handler_|. |
| 190 connection_manager_ = base::WrapUnique( | 190 connection_manager_ = |
| 191 new EngineConnectionManager(authentication_handler_.get())); | 191 base::MakeUnique<EngineConnectionManager>(authentication_handler_.get()); |
| 192 | 192 |
| 193 blob_channel_service_ = | 193 blob_channel_service_ = |
| 194 base::MakeUnique<BlobChannelService>(blob_channel_sender, ui_task_runner); | 194 base::MakeUnique<BlobChannelService>(blob_channel_sender, ui_task_runner); |
| 195 | 195 |
| 196 // Adds BlimpTransports to connection_manager_. | 196 // Adds BlimpTransports to connection_manager_. |
| 197 net::IPEndPoint address(GetIPv4AnyAddress(), GetListeningPort()); | 197 net::IPEndPoint address(GetIPv4AnyAddress(), GetListeningPort()); |
| 198 TCPEngineTransport* transport = new TCPEngineTransport(address, net_log_); | 198 TCPEngineTransport* transport = new TCPEngineTransport(address, net_log_); |
| 199 connection_manager_->AddTransport(base::WrapUnique(transport)); | 199 connection_manager_->AddTransport(base::WrapUnique(transport)); |
| 200 | 200 |
| 201 transport->GetLocalAddress(&address); | 201 transport->GetLocalAddress(&address); |
| (...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 573 std::unique_ptr<content::WebContents> new_contents, | 573 std::unique_ptr<content::WebContents> new_contents, |
| 574 const int target_tab_id) { | 574 const int target_tab_id) { |
| 575 new_contents->SetDelegate(this); | 575 new_contents->SetDelegate(this); |
| 576 | 576 |
| 577 aura::Window* parent = window_tree_host_->window(); | 577 aura::Window* parent = window_tree_host_->window(); |
| 578 aura::Window* content = new_contents->GetNativeView(); | 578 aura::Window* content = new_contents->GetNativeView(); |
| 579 if (!parent->Contains(content)) | 579 if (!parent->Contains(content)) |
| 580 parent->AddChild(content); | 580 parent->AddChild(content); |
| 581 content->Show(); | 581 content->Show(); |
| 582 | 582 |
| 583 tab_ = base::WrapUnique(new Tab(std::move(new_contents), target_tab_id, | 583 tab_ = base::MakeUnique<Tab>(std::move(new_contents), target_tab_id, |
| 584 &render_widget_feature_, | 584 &render_widget_feature_, |
| 585 navigation_message_sender_.get())); | 585 navigation_message_sender_.get()); |
| 586 } | 586 } |
| 587 | 587 |
| 588 } // namespace engine | 588 } // namespace engine |
| 589 } // namespace blimp | 589 } // namespace blimp |
| OLD | NEW |