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

Unified Diff: chrome/app/chrome_exe_main_win.cc

Issue 9718001: Load the metro driver dll at startup (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 8 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 | chrome/app/metro_driver_win.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/app/chrome_exe_main_win.cc
===================================================================
--- chrome/app/chrome_exe_main_win.cc (revision 127508)
+++ chrome/app/chrome_exe_main_win.cc (working copy)
@@ -9,11 +9,12 @@
#include "base/command_line.h"
#include "chrome/app/breakpad_win.h"
#include "chrome/app/client_util.h"
+#include "chrome/app/metro_driver_win.h"
#include "content/public/app/startup_helper_win.h"
#include "content/public/common/result_codes.h"
#include "sandbox/src/sandbox_factory.h"
-int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE, wchar_t*, int) {
+int RunChrome(HINSTANCE instance) {
bool exit_now = true;
// We restarted because of a previous crash. Ask user if we should relaunch.
if (ShowRestartDialogIfCrashed(&exit_now)) {
@@ -36,6 +37,13 @@
int rc = loader->Launch(instance, &sandbox_info);
loader->RelaunchChromeBrowserWithNewCommandLineIfNeeded();
delete loader;
-
return rc;
}
+
+int APIENTRY wWinMain(HINSTANCE instance, HINSTANCE prev, wchar_t*, int) {
+ MetroDriver metro_driver;
+ if (metro_driver.in_metro_mode())
+ return metro_driver.RunInMetro(instance, &RunChrome);
+ // Not in metro mode, proceed as normal.
+ return RunChrome(instance);
+}
« no previous file with comments | « no previous file | chrome/app/metro_driver_win.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698