| OLD | NEW |
| 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/browser/cast_browser_main_parts.h" | 5 #include "chromecast/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 "cc/base/switches.h" | 10 #include "cc/base/switches.h" |
| (...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 135 cast_browser_process_->SetCrashDumpManager( | 135 cast_browser_process_->SetCrashDumpManager( |
| 136 new breakpad::CrashDumpManager(crash_dumps_dir)); | 136 new breakpad::CrashDumpManager(crash_dumps_dir)); |
| 137 #endif | 137 #endif |
| 138 | 138 |
| 139 if (!PlatformClientAuth::Initialize()) { | 139 if (!PlatformClientAuth::Initialize()) { |
| 140 LOG(ERROR) << "PlatformClientAuth::Initialize failed."; | 140 LOG(ERROR) << "PlatformClientAuth::Initialize failed."; |
| 141 } | 141 } |
| 142 | 142 |
| 143 cast_browser_process_->SetRemoteDebuggingServer(new RemoteDebuggingServer()); | 143 cast_browser_process_->SetRemoteDebuggingServer(new RemoteDebuggingServer()); |
| 144 | 144 |
| 145 InitializeWebUI(); | |
| 146 | |
| 147 cast_browser_process_->SetCastService(CastService::Create( | 145 cast_browser_process_->SetCastService(CastService::Create( |
| 148 cast_browser_process_->browser_context(), | 146 cast_browser_process_->browser_context(), |
| 149 url_request_context_factory_->GetSystemGetter(), | 147 url_request_context_factory_->GetSystemGetter(), |
| 150 base::Bind( | 148 base::Bind( |
| 151 &metrics::CastMetricsServiceClient::EnableMetricsService, | 149 &metrics::CastMetricsServiceClient::EnableMetricsService, |
| 152 base::Unretained(cast_browser_process_->metrics_service_client())))); | 150 base::Unretained(cast_browser_process_->metrics_service_client())))); |
| 153 | 151 |
| 154 // Initializing network delegates must happen after Cast service is created. | 152 // Initializing network delegates must happen after Cast service is created. |
| 155 url_request_context_factory_->InitializeNetworkDelegates(); | 153 url_request_context_factory_->InitializeNetworkDelegates(); |
| 156 cast_browser_process_->cast_service()->Start(); | 154 cast_browser_process_->cast_service()->Start(); |
| (...skipping 10 matching lines...) Expand all Loading... |
| 167 return true; | 165 return true; |
| 168 } | 166 } |
| 169 | 167 |
| 170 void CastBrowserMainParts::PostMainMessageLoopRun() { | 168 void CastBrowserMainParts::PostMainMessageLoopRun() { |
| 171 cast_browser_process_->cast_service()->Stop(); | 169 cast_browser_process_->cast_service()->Stop(); |
| 172 cast_browser_process_.reset(); | 170 cast_browser_process_.reset(); |
| 173 } | 171 } |
| 174 | 172 |
| 175 } // namespace shell | 173 } // namespace shell |
| 176 } // namespace chromecast | 174 } // namespace chromecast |
| OLD | NEW |