| 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 | 4 |
| 5 #include "chrome/browser/process_singleton.h" | 5 #include "chrome/browser/process_singleton.h" |
| 6 | 6 |
| 7 #include <shellapi.h> | 7 #include <shellapi.h> |
| 8 | 8 |
| 9 #include "base/base_paths.h" | 9 #include "base/base_paths.h" |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 153 bool ProcessLaunchNotification( | 153 bool ProcessLaunchNotification( |
| 154 const ProcessSingleton::NotificationCallback& notification_callback, | 154 const ProcessSingleton::NotificationCallback& notification_callback, |
| 155 UINT message, | 155 UINT message, |
| 156 WPARAM wparam, | 156 WPARAM wparam, |
| 157 LPARAM lparam, | 157 LPARAM lparam, |
| 158 LRESULT* result) { | 158 LRESULT* result) { |
| 159 if (message != WM_COPYDATA) | 159 if (message != WM_COPYDATA) |
| 160 return false; | 160 return false; |
| 161 | 161 |
| 162 // Handle the WM_COPYDATA message from another process. | 162 // Handle the WM_COPYDATA message from another process. |
| 163 HWND hwnd = reinterpret_cast<HWND>(wparam); | |
| 164 const COPYDATASTRUCT* cds = reinterpret_cast<COPYDATASTRUCT*>(lparam); | 163 const COPYDATASTRUCT* cds = reinterpret_cast<COPYDATASTRUCT*>(lparam); |
| 165 | 164 |
| 166 CommandLine parsed_command_line(CommandLine::NO_PROGRAM); | 165 CommandLine parsed_command_line(CommandLine::NO_PROGRAM); |
| 167 base::FilePath current_directory; | 166 base::FilePath current_directory; |
| 168 if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory)) { | 167 if (!ParseCommandLine(cds, &parsed_command_line, ¤t_directory)) { |
| 169 *result = TRUE; | 168 *result = TRUE; |
| 170 return true; | 169 return true; |
| 171 } | 170 } |
| 172 | 171 |
| 173 *result = notification_callback.Run(parsed_command_line, current_directory) ? | 172 *result = notification_callback.Run(parsed_command_line, current_directory) ? |
| (...skipping 281 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 455 ::SetEvent(metro_activation_event.Get()); | 454 ::SetEvent(metro_activation_event.Get()); |
| 456 } | 455 } |
| 457 } | 456 } |
| 458 } | 457 } |
| 459 | 458 |
| 460 return window_.hwnd() != NULL; | 459 return window_.hwnd() != NULL; |
| 461 } | 460 } |
| 462 | 461 |
| 463 void ProcessSingleton::Cleanup() { | 462 void ProcessSingleton::Cleanup() { |
| 464 } | 463 } |
| OLD | NEW |