| 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 <string> | 7 #include <string> |
| 8 #if !defined(OS_ANDROID) | 8 #if !defined(OS_ANDROID) |
| 9 #include <signal.h> | 9 #include <signal.h> |
| 10 #include <sys/prctl.h> | 10 #include <sys/prctl.h> |
| (...skipping 257 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 268 // code. See CastContentWindow::CreateWindowTree for update when resolution | 268 // code. See CastContentWindow::CreateWindowTree for update when resolution |
| 269 // is available. | 269 // is available. |
| 270 DCHECK(!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)); | 270 DCHECK(!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)); |
| 271 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, | 271 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, |
| 272 aura::TestScreen::Create(gfx::Size(0, 0))); | 272 aura::TestScreen::Create(gfx::Size(0, 0))); |
| 273 #endif | 273 #endif |
| 274 return 0; | 274 return 0; |
| 275 } | 275 } |
| 276 | 276 |
| 277 void CastBrowserMainParts::PreMainMessageLoopRun() { | 277 void CastBrowserMainParts::PreMainMessageLoopRun() { |
| 278 #if !defined(OS_ANDROID) |
| 278 // Set GL strings so GPU config code can make correct feature blacklisting/ | 279 // Set GL strings so GPU config code can make correct feature blacklisting/ |
| 279 // whitelisting decisions. | 280 // whitelisting decisions. |
| 280 // Note: SetGLStrings MUST be called after GpuDataManager::Initialize. | 281 // Note: SetGLStrings MUST be called after GpuDataManager::Initialize. |
| 281 scoped_ptr<CastSysInfo> sys_info = CreateSysInfo(); | 282 scoped_ptr<CastSysInfo> sys_info = CreateSysInfo(); |
| 282 content::GpuDataManager::GetInstance()->SetGLStrings( | 283 content::GpuDataManager::GetInstance()->SetGLStrings( |
| 283 sys_info->GetGlVendor(), sys_info->GetGlRenderer(), | 284 sys_info->GetGlVendor(), sys_info->GetGlRenderer(), |
| 284 sys_info->GetGlVersion()); | 285 sys_info->GetGlVersion()); |
| 286 #endif // !defined(OS_ANDROID) |
| 285 | 287 |
| 286 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple()); | 288 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple()); |
| 287 metrics::RegisterPrefs(pref_registry.get()); | 289 metrics::RegisterPrefs(pref_registry.get()); |
| 288 cast_browser_process_->SetPrefService( | 290 cast_browser_process_->SetPrefService( |
| 289 PrefServiceHelper::CreatePrefService(pref_registry.get())); | 291 PrefServiceHelper::CreatePrefService(pref_registry.get())); |
| 290 | 292 |
| 291 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); | 293 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); |
| 292 #if defined(OS_ANDROID) | 294 #if defined(OS_ANDROID) |
| 293 ::media::SetMediaClientAndroid(new media::CastMediaClientAndroid()); | 295 ::media::SetMediaClientAndroid(new media::CastMediaClientAndroid()); |
| 294 #else | 296 #else |
| (...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 #endif | 382 #endif |
| 381 | 383 |
| 382 DeregisterKillOnAlarm(); | 384 DeregisterKillOnAlarm(); |
| 383 #endif | 385 #endif |
| 384 | 386 |
| 385 media::CastMediaShlib::Finalize(); | 387 media::CastMediaShlib::Finalize(); |
| 386 } | 388 } |
| 387 | 389 |
| 388 } // namespace shell | 390 } // namespace shell |
| 389 } // namespace chromecast | 391 } // namespace chromecast |
| OLD | NEW |