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" |
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
55 if (FAILED(hr)) { | 55 if (FAILED(hr)) { |
56 NOTREACHED() << "Failed to activate metro chrome. Error: " | 56 NOTREACHED() << "Failed to activate metro chrome. Error: " |
57 << std::showbase << std::hex << hr; | 57 << std::showbase << std::hex << hr; |
58 return false; | 58 return false; |
59 } | 59 } |
60 | 60 |
61 return true; | 61 return true; |
62 } | 62 } |
63 | 63 |
64 Win8Environment GetWin8Environment(HostDesktopType desktop) { | 64 Win8Environment GetWin8Environment(HostDesktopType desktop) { |
65 #if defined(USE_AURA) && defined(USE_ASH) | |
66 if (desktop == chrome::HOST_DESKTOP_TYPE_ASH) | 65 if (desktop == chrome::HOST_DESKTOP_TYPE_ASH) |
67 return WIN_8_ENVIRONMENT_METRO_AURA; | 66 return WIN_8_ENVIRONMENT_METRO_AURA; |
68 else | 67 else |
69 return WIN_8_ENVIRONMENT_DESKTOP_AURA; | 68 return WIN_8_ENVIRONMENT_DESKTOP_AURA; |
70 #else | |
71 if (base::win::IsProcessImmersive(::GetCurrentProcess())) | |
72 return WIN_8_ENVIRONMENT_METRO; | |
73 else | |
74 return WIN_8_ENVIRONMENT_DESKTOP; | |
75 #endif | |
76 } | 69 } |
77 | 70 |
78 | 71 |
79 } // namespace chrome | 72 } // namespace chrome |
OLD | NEW |