Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1502)

Side by Side Diff: blimp/engine/session/blimp_engine_session.cc

Issue 1885673003: Create and integrate a metrics service client into Blimp engine. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Clean ups from initial reviews. Created 4 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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();
Wez 2016/04/26 01:38:19 nit: Add a one-line comment to explain what this i
Jess 2016/04/26 21:24:11 Done.
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();
Wez 2016/04/26 01:38:19 Is it important that this happen before we enter t
Jess 2016/04/26 21:24:11 Done. Also moved call to browser_context_->Initia
276 }
277
272 void BlimpEngineSession::RegisterFeatures() { 278 void BlimpEngineSession::RegisterFeatures() {
273 thread_pipe_manager_.reset(new ThreadPipeManager( 279 thread_pipe_manager_.reset(new ThreadPipeManager(
274 content::BrowserThread::GetMessageLoopProxyForThread( 280 content::BrowserThread::GetMessageLoopProxyForThread(
275 content::BrowserThread::IO), 281 content::BrowserThread::IO),
276 content::BrowserThread::GetMessageLoopProxyForThread( 282 content::BrowserThread::GetMessageLoopProxyForThread(
277 content::BrowserThread::UI), 283 content::BrowserThread::UI),
278 net_components_->GetBrowserConnectionHandler())); 284 net_components_->GetBrowserConnectionHandler()));
279 285
280 // Register features' message senders and receivers. 286 // Register features' message senders and receivers.
281 tab_control_message_sender_ = 287 tab_control_message_sender_ =
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
633 639
634 aura::Window* parent = window_tree_host_->window(); 640 aura::Window* parent = window_tree_host_->window();
635 aura::Window* content = web_contents_->GetNativeView(); 641 aura::Window* content = web_contents_->GetNativeView();
636 if (!parent->Contains(content)) 642 if (!parent->Contains(content))
637 parent->AddChild(content); 643 parent->AddChild(content);
638 content->Show(); 644 content->Show();
639 } 645 }
640 646
641 } // namespace engine 647 } // namespace engine
642 } // namespace blimp 648 } // namespace blimp
OLDNEW
« blimp/engine/session/blimp_engine_session.h ('K') | « blimp/engine/session/blimp_engine_session.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698