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

Side by Side Diff: chromecast/shell/browser/cast_browser_main_parts.cc

Issue 618873002: Chromecast: minor buildfixes. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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
« no previous file with comments | « chromecast/metrics/cast_metrics_service_client.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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 "chromecast/shell/browser/cast_browser_main_parts.h" 5 #include "chromecast/shell/browser/cast_browser_main_parts.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/message_loop/message_loop.h" 8 #include "base/message_loop/message_loop.h"
9 #include "base/prefs/pref_registry_simple.h" 9 #include "base/prefs/pref_registry_simple.h"
10 #include "chromecast/common/chromecast_config.h" 10 #include "chromecast/common/chromecast_config.h"
(...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 content::BrowserThread::GetBlockingPool(), 106 content::BrowserThread::GetBlockingPool(),
107 ChromecastConfig::GetInstance()->pref_service(), 107 ChromecastConfig::GetInstance()->pref_service(),
108 cast_browser_process_->browser_context()->GetRequestContext())); 108 cast_browser_process_->browser_context()->GetRequestContext()));
109 cast_browser_process_->SetRemoteDebuggingServer(new RemoteDebuggingServer()); 109 cast_browser_process_->SetRemoteDebuggingServer(new RemoteDebuggingServer());
110 110
111 InitializeWebUI(); 111 InitializeWebUI();
112 112
113 cast_browser_process_->SetCastService(CastService::Create( 113 cast_browser_process_->SetCastService(CastService::Create(
114 cast_browser_process_->browser_context(), 114 cast_browser_process_->browser_context(),
115 url_request_context_factory_->GetSystemGetter(), 115 url_request_context_factory_->GetSystemGetter(),
116 url_request_context_factory_->app_network_delegate(),
117 base::Bind( 116 base::Bind(
118 &metrics::CastMetricsServiceClient::EnableMetricsService, 117 &metrics::CastMetricsServiceClient::EnableMetricsService,
119 base::Unretained(cast_browser_process_->metrics_service_client())))); 118 base::Unretained(cast_browser_process_->metrics_service_client()))));
120 119
121 // Initializing network delegates must happen after Cast service is created. 120 // Initializing network delegates must happen after Cast service is created.
122 url_request_context_factory_->InitializeNetworkDelegates(); 121 url_request_context_factory_->InitializeNetworkDelegates();
123 cast_browser_process_->cast_service()->Start(); 122 cast_browser_process_->cast_service()->Start();
124 } 123 }
125 124
126 bool CastBrowserMainParts::MainMessageLoopRun(int* result_code) { 125 bool CastBrowserMainParts::MainMessageLoopRun(int* result_code) {
127 // If parameters_.ui_task is not NULL, we are running browser tests. In this 126 // If parameters_.ui_task is not NULL, we are running browser tests. In this
128 // case, the browser's main message loop will not run. 127 // case, the browser's main message loop will not run.
129 if (parameters_.ui_task) { 128 if (parameters_.ui_task) {
130 parameters_.ui_task->Run(); 129 parameters_.ui_task->Run();
131 } else { 130 } else {
132 base::MessageLoopForUI::current()->Run(); 131 base::MessageLoopForUI::current()->Run();
133 } 132 }
134 return true; 133 return true;
135 } 134 }
136 135
137 void CastBrowserMainParts::PostMainMessageLoopRun() { 136 void CastBrowserMainParts::PostMainMessageLoopRun() {
138 cast_browser_process_->cast_service()->Stop(); 137 cast_browser_process_->cast_service()->Stop();
139 cast_browser_process_.reset(); 138 cast_browser_process_.reset();
140 } 139 }
141 140
142 } // namespace shell 141 } // namespace shell
143 } // namespace chromecast 142 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/metrics/cast_metrics_service_client.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698