| 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/chrome_process_finder_win.h" | 5 #include "chrome/browser/chrome_process_finder_win.h" |
| 6 | 6 |
| 7 #include <shellapi.h> | 7 #include <shellapi.h> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
| (...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 144 process_handle.Receive())) { | 144 process_handle.Receive())) { |
| 145 // Receive() causes the process handle to be set in the destructor of the | 145 // Receive() causes the process handle to be set in the destructor of the |
| 146 // temporary receiver object, which does not happen until after the if | 146 // temporary receiver object, which does not happen until after the if |
| 147 // statement is complete. So IsProcessImmersive() should only be checked | 147 // statement is complete. So IsProcessImmersive() should only be checked |
| 148 // as part of a separate if statement. | 148 // as part of a separate if statement. |
| 149 if (base::win::IsProcessImmersive(process_handle.Get())) | 149 if (base::win::IsProcessImmersive(process_handle.Get())) |
| 150 chrome::ActivateMetroChrome(); | 150 chrome::ActivateMetroChrome(); |
| 151 } | 151 } |
| 152 #endif | 152 #endif |
| 153 | 153 |
| 154 CommandLine command_line(*CommandLine::ForCurrentProcess()); | 154 base::CommandLine command_line(*base::CommandLine::ForCurrentProcess()); |
| 155 command_line.AppendSwitchASCII( | 155 command_line.AppendSwitchASCII( |
| 156 switches::kOriginalProcessStartTime, | 156 switches::kOriginalProcessStartTime, |
| 157 base::Int64ToString( | 157 base::Int64ToString( |
| 158 base::CurrentProcessInfo::CreationTime().ToInternalValue())); | 158 base::CurrentProcessInfo::CreationTime().ToInternalValue())); |
| 159 | 159 |
| 160 if (fast_start) | 160 if (fast_start) |
| 161 command_line.AppendSwitch(switches::kFastStart); | 161 command_line.AppendSwitch(switches::kFastStart); |
| 162 | 162 |
| 163 // Send the command line to the remote chrome window. | 163 // Send the command line to the remote chrome window. |
| 164 // Format is "START\0<<<current directory>>>\0<<<commandline>>>". | 164 // Format is "START\0<<<current directory>>>\0<<<commandline>>>". |
| (...skipping 27 matching lines...) Expand all Loading... |
| 192 | 192 |
| 193 // It is possible that the process owning this window may have died by now. | 193 // It is possible that the process owning this window may have died by now. |
| 194 if (!::IsWindow(remote_window)) | 194 if (!::IsWindow(remote_window)) |
| 195 return NOTIFY_FAILED; | 195 return NOTIFY_FAILED; |
| 196 | 196 |
| 197 // If the window couldn't be notified but still exists, assume it is hung. | 197 // If the window couldn't be notified but still exists, assume it is hung. |
| 198 return NOTIFY_WINDOW_HUNG; | 198 return NOTIFY_WINDOW_HUNG; |
| 199 } | 199 } |
| 200 | 200 |
| 201 } // namespace chrome | 201 } // namespace chrome |
| OLD | NEW |