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

Unified Diff: chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc

Issue 54093007: Restart in Desktop if Metro tries to start up without GPU (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: use public/ Created 7 years, 1 month 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: chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
diff --git a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
index b059916ec975cd3bf95c137f1b231a223481626c..50d6c50748bc994fe3ef79302cde5e2e44f08735 100644
--- a/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
+++ b/chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.cc
@@ -4,12 +4,15 @@
#include "chrome/browser/metro_viewer/chrome_metro_viewer_process_host_aurawin.h"
+#include <atlbase.h>
cpu_(ooo_6.6-7.5) 2013/11/04 19:17:02 please no ATL. Does our LOG() not work in this cas
scottmg 2013/11/04 23:05:44 Done.
+
#include "ash/shell.h"
#include "base/logging.h"
#include "base/memory/ref_counted.h"
#include "chrome/browser/browser_process.h"
#include "chrome/browser/browser_process_platform_part_aurawin.h"
#include "chrome/browser/chrome_notification_types.h"
+#include "chrome/browser/lifetime/application_lifetime.h"
#include "chrome/browser/profiles/profile_manager.h"
#include "chrome/browser/search_engines/util.h"
#include "chrome/browser/ui/ash/ash_init.h"
@@ -21,6 +24,7 @@
#include "chrome/browser/ui/tabs/tab_strip_model.h"
#include "chrome/common/env_vars.h"
#include "content/public/browser/browser_thread.h"
+#include "content/public/browser/gpu_data_manager.h"
#include "content/public/browser/notification_service.h"
#include "content/public/browser/page_navigator.h"
#include "content/public/browser/web_contents.h"
@@ -94,6 +98,12 @@ void ChromeMetroViewerProcessHost::OnChannelConnected(int32 /*peer_pid*/) {
// Set environment variable to let breakpad know that metro process was
// connected.
::SetEnvironmentVariableA(env_vars::kMetroConnected, "1");
+
+ if (!content::GpuDataManager::GetInstance()->GpuAccessAllowed(NULL)) {
+ AtlTrace("%hs: No GPU access, attempting to restart in Desktop\n",
+ __FUNCTION__);
+ chrome::AttemptRestartToDesktopMode();
+ }
}
void ChromeMetroViewerProcessHost::OnSetTargetSurface(
« 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