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 // Implementation of the CommandExecuteImpl class which implements the | 4 // Implementation of the CommandExecuteImpl class which implements the |
5 // IExecuteCommand and related interfaces for handling ShellExecute based | 5 // IExecuteCommand and related interfaces for handling ShellExecute based |
6 // launches of the Chrome browser. | 6 // launches of the Chrome browser. |
7 | 7 |
8 #include "win8/delegate_execute/command_execute_impl.h" | 8 #include "win8/delegate_execute/command_execute_impl.h" |
9 | 9 |
10 #include "base/file_util.h" | 10 #include "base/file_util.h" |
(...skipping 119 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
130 return E_FAIL; | 130 return E_FAIL; |
131 } | 131 } |
132 | 132 |
133 if (integrity_level_ == base::HIGH_INTEGRITY) { | 133 if (integrity_level_ == base::HIGH_INTEGRITY) { |
134 // Metro mode apps don't work in high integrity mode. | 134 // Metro mode apps don't work in high integrity mode. |
135 AtlTrace("High integrity, AHE_DESKTOP\n"); | 135 AtlTrace("High integrity, AHE_DESKTOP\n"); |
136 *pahe = AHE_DESKTOP; | 136 *pahe = AHE_DESKTOP; |
137 return S_OK; | 137 return S_OK; |
138 } | 138 } |
139 | 139 |
| 140 if (GetAsyncKeyState(VK_SHIFT) && GetAsyncKeyState(VK_F11)) { |
| 141 AtlTrace("Using Shift-F11 debug hook, returning AHE_IMMERSIVE\n"); |
| 142 *pahe = AHE_IMMERSIVE; |
| 143 return S_OK; |
| 144 } |
| 145 |
140 FilePath user_data_dir; | 146 FilePath user_data_dir; |
141 if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { | 147 if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { |
142 AtlTrace("Failed to get chrome's data dir path, E_FAIL\n"); | 148 AtlTrace("Failed to get chrome's data dir path, E_FAIL\n"); |
143 return E_FAIL; | 149 return E_FAIL; |
144 } | 150 } |
145 | 151 |
146 HWND chrome_window = ::FindWindowEx(HWND_MESSAGE, NULL, | 152 HWND chrome_window = ::FindWindowEx(HWND_MESSAGE, NULL, |
147 chrome::kMessageWindowClass, | 153 chrome::kMessageWindowClass, |
148 user_data_dir.value().c_str()); | 154 user_data_dir.value().c_str()); |
149 if (chrome_window) { | 155 if (chrome_window) { |
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
444 AtlTrace("Invalid registry launch mode value %u\n", reg_value); | 450 AtlTrace("Invalid registry launch mode value %u\n", reg_value); |
445 launch_mode = ECHUIM_DESKTOP; | 451 launch_mode = ECHUIM_DESKTOP; |
446 } else { | 452 } else { |
447 AtlTrace("Launch mode forced by registry to %s\n", modes[launch_mode]); | 453 AtlTrace("Launch mode forced by registry to %s\n", modes[launch_mode]); |
448 launch_mode = static_cast<EC_HOST_UI_MODE>(reg_value); | 454 launch_mode = static_cast<EC_HOST_UI_MODE>(reg_value); |
449 } | 455 } |
450 | 456 |
451 launch_mode_determined = true; | 457 launch_mode_determined = true; |
452 return launch_mode; | 458 return launch_mode; |
453 } | 459 } |
OLD | NEW |