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

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

Issue 1132663004: Chromecast: adds Android implementation of CastSysInfo. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 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 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 256 matching lines...) Expand 10 before | Expand all | Expand 10 after
267 // code. See CastContentWindow::CreateWindowTree for update when resolution 267 // code. See CastContentWindow::CreateWindowTree for update when resolution
268 // is available. 268 // is available.
269 DCHECK(!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE)); 269 DCHECK(!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE));
270 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE, 270 gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
271 aura::TestScreen::Create(gfx::Size(0, 0))); 271 aura::TestScreen::Create(gfx::Size(0, 0)));
272 #endif 272 #endif
273 return 0; 273 return 0;
274 } 274 }
275 275
276 void CastBrowserMainParts::PreMainMessageLoopRun() { 276 void CastBrowserMainParts::PreMainMessageLoopRun() {
277 #if !defined(OS_ANDROID)
277 // Set GL strings so GPU config code can make correct feature blacklisting/ 278 // Set GL strings so GPU config code can make correct feature blacklisting/
278 // whitelisting decisions. 279 // whitelisting decisions.
279 // Note: SetGLStrings MUST be called after GpuDataManager::Initialize. 280 // Note: SetGLStrings MUST be called after GpuDataManager::Initialize.
280 scoped_ptr<CastSysInfo> sys_info = CreateSysInfo(); 281 scoped_ptr<CastSysInfo> sys_info = CreateSysInfo();
281 content::GpuDataManager::GetInstance()->SetGLStrings( 282 content::GpuDataManager::GetInstance()->SetGLStrings(
282 sys_info->GetGlVendor(), sys_info->GetGlRenderer(), 283 sys_info->GetGlVendor(), sys_info->GetGlRenderer(),
283 sys_info->GetGlVersion()); 284 sys_info->GetGlVersion());
285 #endif // !defined(OS_ANDROID)
284 286
285 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple()); 287 scoped_refptr<PrefRegistrySimple> pref_registry(new PrefRegistrySimple());
286 metrics::RegisterPrefs(pref_registry.get()); 288 metrics::RegisterPrefs(pref_registry.get());
287 cast_browser_process_->SetPrefService( 289 cast_browser_process_->SetPrefService(
288 PrefServiceHelper::CreatePrefService(pref_registry.get())); 290 PrefServiceHelper::CreatePrefService(pref_registry.get()));
289 291
290 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess(); 292 const base::CommandLine* cmd_line = base::CommandLine::ForCurrentProcess();
291 #if defined(OS_ANDROID) 293 #if defined(OS_ANDROID)
292 ::media::SetMediaClientAndroid(new media::CastMediaClientAndroid()); 294 ::media::SetMediaClientAndroid(new media::CastMediaClientAndroid());
293 #else 295 #else
(...skipping 85 matching lines...) Expand 10 before | Expand all | Expand 10 after
379 #endif 381 #endif
380 382
381 DeregisterKillOnAlarm(); 383 DeregisterKillOnAlarm();
382 #endif 384 #endif
383 385
384 media::CastMediaShlib::Finalize(); 386 media::CastMediaShlib::Finalize();
385 } 387 }
386 388
387 } // namespace shell 389 } // namespace shell
388 } // namespace chromecast 390 } // namespace chromecast
OLDNEW
« no previous file with comments | « chromecast/browser/android/apk/src/org/chromium/chromecast/shell/CastSysInfoAndroid.java ('k') | chromecast/chromecast.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698