Chromium Code Reviews| 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 | 8 |
| 9 #include "base/command_line.h" | 9 #include "base/command_line.h" |
| 10 #include "base/memory/ptr_util.h" | 10 #include "base/memory/ptr_util.h" |
| (...skipping 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 253 | 253 |
| 254 window_tree_client_.reset( | 254 window_tree_client_.reset( |
| 255 new BlimpWindowTreeClient(window_tree_host_->window())); | 255 new BlimpWindowTreeClient(window_tree_host_->window())); |
| 256 | 256 |
| 257 window_tree_host_->GetInputMethod()->AddObserver(this); | 257 window_tree_host_->GetInputMethod()->AddObserver(this); |
| 258 | 258 |
| 259 window_tree_host_->SetBounds(gfx::Rect(screen_->GetPrimaryDisplay().size())); | 259 window_tree_host_->SetBounds(gfx::Rect(screen_->GetPrimaryDisplay().size())); |
| 260 | 260 |
| 261 RegisterFeatures(); | 261 RegisterFeatures(); |
| 262 | 262 |
| 263 browser_context_->Initialize(); | |
| 264 | |
| 263 // Initialize must only be posted after the RegisterFeature calls have | 265 // Initialize must only be posted after the RegisterFeature calls have |
| 264 // completed. | 266 // completed. |
| 265 content::BrowserThread::PostTask( | 267 content::BrowserThread::PostTask( |
| 266 content::BrowserThread::IO, FROM_HERE, | 268 content::BrowserThread::IO, FROM_HERE, |
| 267 base::Bind(&EngineNetworkComponents::Initialize, | 269 base::Bind(&EngineNetworkComponents::Initialize, |
| 268 base::Unretained(net_components_.get()), | 270 base::Unretained(net_components_.get()), |
| 269 engine_config_->client_token())); | 271 engine_config_->client_token())); |
| 270 } | 272 } |
| 271 | 273 |
| 274 void BlimpEngineSession::Finalize() { | |
| 275 browser_context_->Finalize(); | |
| 276 } | |
|
Bernhard Bauer
2016/04/25 08:21:36
Nit: empty line after this one.
Jess
2016/04/26 00:01:25
Done.
| |
| 272 void BlimpEngineSession::RegisterFeatures() { | 277 void BlimpEngineSession::RegisterFeatures() { |
| 273 thread_pipe_manager_.reset(new ThreadPipeManager( | 278 thread_pipe_manager_.reset(new ThreadPipeManager( |
| 274 content::BrowserThread::GetMessageLoopProxyForThread( | 279 content::BrowserThread::GetMessageLoopProxyForThread( |
| 275 content::BrowserThread::IO), | 280 content::BrowserThread::IO), |
| 276 content::BrowserThread::GetMessageLoopProxyForThread( | 281 content::BrowserThread::GetMessageLoopProxyForThread( |
| 277 content::BrowserThread::UI), | 282 content::BrowserThread::UI), |
| 278 net_components_->GetBrowserConnectionHandler())); | 283 net_components_->GetBrowserConnectionHandler())); |
| 279 | 284 |
| 280 // Register features' message senders and receivers. | 285 // Register features' message senders and receivers. |
| 281 tab_control_message_sender_ = | 286 tab_control_message_sender_ = |
| (...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 633 | 638 |
| 634 aura::Window* parent = window_tree_host_->window(); | 639 aura::Window* parent = window_tree_host_->window(); |
| 635 aura::Window* content = web_contents_->GetNativeView(); | 640 aura::Window* content = web_contents_->GetNativeView(); |
| 636 if (!parent->Contains(content)) | 641 if (!parent->Contains(content)) |
| 637 parent->AddChild(content); | 642 parent->AddChild(content); |
| 638 content->Show(); | 643 content->Show(); |
| 639 } | 644 } |
| 640 | 645 |
| 641 } // namespace engine | 646 } // namespace engine |
| 642 } // namespace blimp | 647 } // namespace blimp |
| OLD | NEW |