| 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 #ifndef CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_ | 5 #ifndef CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_ |
| 6 #define CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_ | 6 #define CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_ |
| 7 | 7 |
| 8 #include <windows.h> | 8 #include <windows.h> |
| 9 | 9 |
| 10 #include "base/time/time.h" |
| 11 |
| 10 namespace base { | 12 namespace base { |
| 11 class FilePath; | 13 class FilePath; |
| 12 } | 14 } |
| 13 | 15 |
| 14 namespace chrome { | 16 namespace chrome { |
| 15 | 17 |
| 16 enum NotifyChromeResult { | 18 enum NotifyChromeResult { |
| 17 NOTIFY_SUCCESS, | 19 NOTIFY_SUCCESS, |
| 18 NOTIFY_FAILED, | 20 NOTIFY_FAILED, |
| 19 NOTIFY_WINDOW_HUNG, | 21 NOTIFY_WINDOW_HUNG, |
| 20 }; | 22 }; |
| 21 | 23 |
| 22 // Finds an already running Chrome window if it exists. | 24 // Finds an already running Chrome window if it exists. |
| 23 HWND FindRunningChromeWindow(const base::FilePath& user_data_dir); | 25 HWND FindRunningChromeWindow(const base::FilePath& user_data_dir); |
| 24 | 26 |
| 25 // Attempts to send the current command line to an already running instance of | 27 // Attempts to send the current command line to an already running instance of |
| 26 // Chrome via a WM_COPYDATA message. | 28 // Chrome via a WM_COPYDATA message. |
| 27 // Returns true if a running Chrome is found and successfully notified. | 29 // Returns true if a running Chrome is found and successfully notified. |
| 28 // |fast_start| is true when this is being called on the window fast start path. | 30 // |fast_start| is true when this is being called on the window fast start path. |
| 29 NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window, | 31 NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window, |
| 30 bool fast_start); | 32 bool fast_start); |
| 31 | 33 |
| 34 // Changes the notification timeout to |new_timeout|, returns the old timeout. |
| 35 base::TimeDelta SetNotificationTimeoutForTesting(base::TimeDelta new_timeout); |
| 36 |
| 32 } // namespace chrome | 37 } // namespace chrome |
| 33 | 38 |
| 34 #endif // CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_ | 39 #endif // CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_ |
| OLD | NEW |