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

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: Adding //net to app_metrics. Created 4 years, 7 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 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 render_widget_feature_(settings_manager_), 210 render_widget_feature_(settings_manager_),
211 net_components_( 211 net_components_(
212 new EngineNetworkComponents(net_log, 212 new EngineNetworkComponents(net_log,
213 QuitCurrentMessageLoopClosure())) { 213 QuitCurrentMessageLoopClosure())) {
214 DCHECK(engine_config_); 214 DCHECK(engine_config_);
215 DCHECK(settings_manager_); 215 DCHECK(settings_manager_);
216 screen_->UpdateDisplayScaleAndSize(kDefaultScaleFactor, 216 screen_->UpdateDisplayScaleAndSize(kDefaultScaleFactor,
217 gfx::Size(kDefaultDisplayWidth, 217 gfx::Size(kDefaultDisplayWidth,
218 kDefaultDisplayHeight)); 218 kDefaultDisplayHeight));
219 render_widget_feature_.SetDelegate(kDummyTabId, this); 219 render_widget_feature_.SetDelegate(kDummyTabId, this);
220
221 // Initializes the PrefService and MetricsServiceClient for Blimp.
222 browser_context_->Initialize();
220 } 223 }
221 224
222 BlimpEngineSession::~BlimpEngineSession() { 225 BlimpEngineSession::~BlimpEngineSession() {
226 browser_context_->Finalize();
227
223 render_widget_feature_.RemoveDelegate(kDummyTabId); 228 render_widget_feature_.RemoveDelegate(kDummyTabId);
224 229
225 window_tree_host_->GetInputMethod()->RemoveObserver(this); 230 window_tree_host_->GetInputMethod()->RemoveObserver(this);
226 231
227 // Ensure that all WebContents are torn down first, since teardown will 232 // Ensure that all WebContents are torn down first, since teardown will
228 // trigger RenderViewDeleted callbacks to their observers. 233 // trigger RenderViewDeleted callbacks to their observers.
229 web_contents_.reset(); 234 web_contents_.reset();
230 235
231 // Safely delete network components on the IO thread. 236 // Safely delete network components on the IO thread.
232 content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE, 237 content::BrowserThread::DeleteSoon(content::BrowserThread::IO, FROM_HERE,
(...skipping 401 matching lines...) Expand 10 before | Expand all | Expand 10 after
634 639
635 aura::Window* parent = window_tree_host_->window(); 640 aura::Window* parent = window_tree_host_->window();
636 aura::Window* content = web_contents_->GetNativeView(); 641 aura::Window* content = web_contents_->GetNativeView();
637 if (!parent->Contains(content)) 642 if (!parent->Contains(content))
638 parent->AddChild(content); 643 parent->AddChild(content);
639 content->Show(); 644 content->Show();
640 } 645 }
641 646
642 } // namespace engine 647 } // namespace engine
643 } // namespace blimp 648 } // namespace blimp
OLDNEW
« blimp/engine/common/blimp_browser_context.cc ('K') | « blimp/engine/common/blimp_browser_context.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698