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 <stddef.h> | 7 #include <stddef.h> |
8 #include <string.h> | 8 #include <string.h> |
9 | 9 |
10 #include <string> | 10 #include <string> |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
336 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( | 336 content::ChildProcessSecurityPolicy::GetInstance()->RegisterWebSafeScheme( |
337 kChromeResourceScheme); | 337 kChromeResourceScheme); |
338 return 0; | 338 return 0; |
339 } | 339 } |
340 | 340 |
341 void CastBrowserMainParts::PreMainMessageLoopRun() { | 341 void CastBrowserMainParts::PreMainMessageLoopRun() { |
342 #if !defined(OS_ANDROID) | 342 #if !defined(OS_ANDROID) |
343 // Set GL strings so GPU config code can make correct feature blacklisting/ | 343 // Set GL strings so GPU config code can make correct feature blacklisting/ |
344 // whitelisting decisions. | 344 // whitelisting decisions. |
345 // Note: SetGLStrings MUST be called after GpuDataManager::Initialize. | 345 // Note: SetGLStrings MUST be called after GpuDataManager::Initialize. |
346 // TODO(j.isorce) move SetGLStrings call to PreCreateThreads, i.e. before | |
347 // launching the gpu process since these infos are used to decide whether or | |
jam
2016/02/10 18:32:33
why is this a todo instead of actually doing it?
| |
348 // not to spawn it. | |
346 scoped_ptr<CastSysInfo> sys_info = CreateSysInfo(); | 349 scoped_ptr<CastSysInfo> sys_info = CreateSysInfo(); |
347 content::GpuDataManager::GetInstance()->SetGLStrings( | 350 content::GpuDataManager::GetInstance()->SetGLStrings( |
348 sys_info->GetGlVendor(), sys_info->GetGlRenderer(), | 351 sys_info->GetGlVendor(), sys_info->GetGlRenderer(), |
349 sys_info->GetGlVersion()); | 352 sys_info->GetGlVersion()); |
350 #endif // !defined(OS_ANDROID) | 353 #endif // !defined(OS_ANDROID) |
351 | 354 |
352 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple()); | 355 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple()); |
353 metrics::RegisterPrefs(pref_registry.get()); | 356 metrics::RegisterPrefs(pref_registry.get()); |
354 cast_browser_process_->SetPrefService( | 357 cast_browser_process_->SetPrefService( |
355 PrefServiceHelper::CreatePrefService(pref_registry.get())); | 358 PrefServiceHelper::CreatePrefService(pref_registry.get())); |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
454 #if defined(USE_AURA) | 457 #if defined(USE_AURA) |
455 aura::Env::DeleteInstance(); | 458 aura::Env::DeleteInstance(); |
456 #endif | 459 #endif |
457 | 460 |
458 DeregisterKillOnAlarm(); | 461 DeregisterKillOnAlarm(); |
459 #endif | 462 #endif |
460 } | 463 } |
461 | 464 |
462 } // namespace shell | 465 } // namespace shell |
463 } // namespace chromecast | 466 } // namespace chromecast |
OLD | NEW |