Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/metro_utils/metro_chrome_win.h" | 5 #include "chrome/browser/metro_utils/metro_chrome_win.h" |
| 6 | 6 |
| 7 #include <windows.h> | 7 #include <windows.h> |
| 8 #include <shobjidl.h> | 8 #include <shobjidl.h> |
| 9 | 9 |
| 10 #include "base/files/file_path.h" | 10 #include "base/files/file_path.h" |
| 11 #include "base/path_service.h" | 11 #include "base/path_service.h" |
| 12 #include "base/win/metro.h" | 12 #include "base/win/metro.h" |
| 13 #include "base/win/scoped_com_initializer.h" | 13 #include "base/win/scoped_com_initializer.h" |
| 14 #include "base/win/scoped_comptr.h" | 14 #include "base/win/scoped_comptr.h" |
| 15 #include "base/win/windows_version.h" | |
| 15 #include "chrome/installer/util/browser_distribution.h" | 16 #include "chrome/installer/util/browser_distribution.h" |
| 16 #include "chrome/installer/util/install_util.h" | 17 #include "chrome/installer/util/install_util.h" |
| 17 #include "chrome/installer/util/shell_util.h" | 18 #include "chrome/installer/util/shell_util.h" |
| 18 | 19 |
| 19 namespace chrome { | 20 namespace chrome { |
| 20 | 21 |
| 21 bool ActivateMetroChrome() { | 22 bool ActivateMetroChrome() { |
| 23 if (base::win::GetVersion() < base::win::VERSION_WIN8) | |
|
ananta
2014/04/11 02:25:24
Would it make sense to launch the ASH version on W
| |
| 24 return true; | |
| 25 | |
| 22 base::FilePath chrome_exe; | 26 base::FilePath chrome_exe; |
| 23 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { | 27 if (!PathService::Get(base::FILE_EXE, &chrome_exe)) { |
| 24 NOTREACHED() << "Failed to get chrome exe path"; | 28 NOTREACHED() << "Failed to get chrome exe path"; |
| 25 return false; | 29 return false; |
| 26 } | 30 } |
| 27 | 31 |
| 28 base::string16 app_id = ShellUtil::GetBrowserModelId( | 32 base::string16 app_id = ShellUtil::GetBrowserModelId( |
| 29 BrowserDistribution::GetDistribution(), | 33 BrowserDistribution::GetDistribution(), |
| 30 InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())); | 34 InstallUtil::IsPerUserInstall(chrome_exe.value().c_str())); |
| 31 if (app_id.empty()) { | 35 if (app_id.empty()) { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 65 #else | 69 #else |
| 66 if (base::win::IsProcessImmersive(::GetCurrentProcess())) | 70 if (base::win::IsProcessImmersive(::GetCurrentProcess())) |
| 67 return WIN_8_ENVIRONMENT_METRO; | 71 return WIN_8_ENVIRONMENT_METRO; |
| 68 else | 72 else |
| 69 return WIN_8_ENVIRONMENT_DESKTOP; | 73 return WIN_8_ENVIRONMENT_DESKTOP; |
| 70 #endif | 74 #endif |
| 71 } | 75 } |
| 72 | 76 |
| 73 | 77 |
| 74 } // namespace chrome | 78 } // namespace chrome |
| OLD | NEW |