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

Unified Diff: chromecast/browser/cast_browser_main_parts.cc

Issue 1021483005: Create gfx::Screen at startup for cast_shell (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chromecast/browser/cast_browser_main_parts.cc
diff --git a/chromecast/browser/cast_browser_main_parts.cc b/chromecast/browser/cast_browser_main_parts.cc
index f1dfbe33e4f0fa87bdf4b5e849af9bada29fd72f..254b49419a123c44a2d721169e31bc7714aeda85 100644
--- a/chromecast/browser/cast_browser_main_parts.cc
+++ b/chromecast/browser/cast_browser_main_parts.cc
@@ -40,6 +40,11 @@
#include "net/android/network_change_notifier_factory_android.h"
#endif
+#if defined(USE_AURA)
+#include "ui/aura/test/test_screen.h"
+#include "ui/gfx/screen.h"
+#endif
+
namespace {
#if !defined(OS_ANDROID)
@@ -194,6 +199,12 @@ int CastBrowserMainParts::PreCreateThreads() {
if (!base::CreateDirectory(home_dir))
return 1;
#endif
+
+#if defined(USE_AURA)
+ DCHECK(!gfx::Screen::GetScreenByType(gfx::SCREEN_TYPE_NATIVE));
lcwu1 2015/03/25 20:32:28 Let's add some comments explaining why we need to
halliwell 2015/03/25 21:56:48 Done.
+ gfx::Screen::SetScreenInstance(gfx::SCREEN_TYPE_NATIVE,
+ aura::TestScreen::Create(gfx::Size(0, 0)));
+#endif
return 0;
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698