OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 "chrome/browser/lifetime/application_lifetime.h" | 5 #include "chrome/browser/lifetime/application_lifetime.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/prefs/pref_service.h" | 8 #include "base/prefs/pref_service.h" |
9 #include "base/win/metro.h" | 9 #include "base/win/metro.h" |
10 #include "base/win/windows_version.h" | 10 #include "base/win/windows_version.h" |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
57 prefs->SetString(prefs::kRelaunchMode, | 57 prefs->SetString(prefs::kRelaunchMode, |
58 upgrade_util::kRelaunchModeDesktop); | 58 upgrade_util::kRelaunchModeDesktop); |
59 } else { | 59 } else { |
60 prefs->SetString(prefs::kRelaunchMode, | 60 prefs->SetString(prefs::kRelaunchMode, |
61 upgrade_util::kRelaunchModeMetro); | 61 upgrade_util::kRelaunchModeMetro); |
62 } | 62 } |
63 AttemptRestart(); | 63 AttemptRestart(); |
64 } | 64 } |
65 | 65 |
66 #if defined(USE_AURA) | 66 #if defined(USE_AURA) |
| 67 void MetroExitHelper() { |
| 68 aura::HandleMetroExit(); |
| 69 } |
| 70 |
67 void ActivateDesktopHelper(AshExecutionStatus ash_execution_status) { | 71 void ActivateDesktopHelper(AshExecutionStatus ash_execution_status) { |
68 scoped_ptr<base::Environment> env(base::Environment::Create()); | 72 scoped_ptr<base::Environment> env(base::Environment::Create()); |
69 std::string version_str; | 73 std::string version_str; |
70 | 74 |
71 // Get the version variable and remove it from the environment. | 75 // Get the version variable and remove it from the environment. |
72 if (!env->GetVar(chrome::kChromeVersionEnvVar, &version_str)) | 76 if (!env->GetVar(chrome::kChromeVersionEnvVar, &version_str)) |
73 version_str.clear(); | 77 version_str.clear(); |
74 | 78 |
75 base::FilePath exe_path; | 79 base::FilePath exe_path; |
76 if (!PathService::Get(base::FILE_EXE, &exe_path)) | 80 if (!PathService::Get(base::FILE_EXE, &exe_path)) |
(...skipping 25 matching lines...) Expand all Loading... |
102 } | 106 } |
103 | 107 |
104 void AttemptRestartToMetroMode() { | 108 void AttemptRestartToMetroMode() { |
105 PrefService* prefs = g_browser_process->local_state(); | 109 PrefService* prefs = g_browser_process->local_state(); |
106 prefs->SetString(prefs::kRelaunchMode, | 110 prefs->SetString(prefs::kRelaunchMode, |
107 upgrade_util::kRelaunchModeMetro); | 111 upgrade_util::kRelaunchModeMetro); |
108 AttemptRestart(); | 112 AttemptRestart(); |
109 } | 113 } |
110 | 114 |
111 } // namespace chrome | 115 } // namespace chrome |
OLD | NEW |