Chromium Code Reviews| 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 125 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 136 *pahe = AHE_DESKTOP; | 136 *pahe = AHE_DESKTOP; |
| 137 return S_OK; | 137 return S_OK; |
| 138 } | 138 } |
| 139 | 139 |
| 140 FilePath user_data_dir; | 140 FilePath user_data_dir; |
| 141 if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { | 141 if (!PathService::Get(chrome::DIR_USER_DATA, &user_data_dir)) { |
| 142 AtlTrace("Failed to get chrome's data dir path, E_FAIL\n"); | 142 AtlTrace("Failed to get chrome's data dir path, E_FAIL\n"); |
| 143 return E_FAIL; | 143 return E_FAIL; |
| 144 } | 144 } |
| 145 | 145 |
| 146 if (GetAsyncKeyState(VK_SHIFT) && GetAsyncKeyState(VK_F11)) { | |
| 147 AtlTrace("Using Shift-F11 debug hook, returning AHE_IMMERSIVE"); | |
|
cpu_(ooo_6.6-7.5)
2012/09/28 21:37:37
move block ahead of line 140
cpu_(ooo_6.6-7.5)
2012/09/28 21:37:37
\n at end of atltrace
scottmg
2012/09/28 22:14:28
Done.
scottmg
2012/09/28 22:14:28
Done.
| |
| 148 *pahe = AHE_IMMERSIVE; | |
| 149 return S_OK; | |
| 150 } | |
| 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) { |
| 150 AtlTrace("Found chrome window %p\n", chrome_window); | 156 AtlTrace("Found chrome window %p\n", chrome_window); |
| 151 // The failure cases below are deemed to happen due to the inherently racy | 157 // The failure cases below are deemed to happen due to the inherently racy |
| 152 // procedure of going from chrome's window to process handle during which | 158 // procedure of going from chrome's window to process handle during which |
| 153 // chrome might have exited. Failing here would probably just cause the | 159 // chrome might have exited. Failing here would probably just cause the |
| 154 // user to retry at which point we would do the right thing. | 160 // user to retry at which point we would do the right thing. |
| 155 DWORD chrome_pid = 0; | 161 DWORD chrome_pid = 0; |
| (...skipping 288 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 |