Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / chrome / browser / chrome_process_finder_win.h
bloba66429de5e7462310ec422d8e682b343af6bbfbf
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
3 // found in the LICENSE file.
5 #ifndef CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_
6 #define CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_
8 #include <windows.h>
10 #include "base/time/time.h"
12 namespace base {
13 class FilePath;
16 namespace chrome {
18 enum NotifyChromeResult {
19 NOTIFY_SUCCESS,
20 NOTIFY_FAILED,
21 NOTIFY_WINDOW_HUNG,
24 // Finds an already running Chrome window if it exists.
25 HWND FindRunningChromeWindow(const base::FilePath& user_data_dir);
27 // Attempts to send the current command line to an already running instance of
28 // Chrome via a WM_COPYDATA message.
29 // Returns true if a running Chrome is found and successfully notified.
30 // |fast_start| is true when this is being called on the window fast start path.
31 NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window,
32 bool fast_start);
34 // Changes the notification timeout to |new_timeout|, returns the old timeout.
35 base::TimeDelta SetNotificationTimeoutForTesting(base::TimeDelta new_timeout);
37 } // namespace chrome
39 #endif // CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_