electron/atom/browser/atom_process_finder_win.h

40 lines
1.2 KiB
C
Raw Normal View History

2015-10-19 18:43:45 +00:00
// Copyright 2013 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
2015-10-19 18:47:38 +00:00
#ifndef ATOM_BROWSER_ATOM_PROCESS_FINDER_WIN_H_
#define ATOM_BROWSER_ATOM_PROCESS_FINDER_WIN_H_
2015-10-19 18:43:45 +00:00
#include <windows.h>
#include "base/time/time.h"
namespace base {
class FilePath;
}
2015-10-19 18:47:38 +00:00
namespace atom {
2015-10-19 18:43:45 +00:00
enum NotifyChromeResult {
NOTIFY_SUCCESS,
NOTIFY_FAILED,
NOTIFY_WINDOW_HUNG,
};
// Finds an already running Chrome window if it exists.
2015-10-19 18:47:38 +00:00
HWND FindRunningAtomWindow(const base::FilePath& user_data_dir);
2015-10-19 18:43:45 +00:00
// Attempts to send the current command line to an already running instance of
// Chrome via a WM_COPYDATA message.
// Returns true if a running Chrome is found and successfully notified.
// |fast_start| is true when this is being called on the window fast start path.
2015-10-19 18:47:38 +00:00
NotifyChromeResult AttemptToNotifyRunningAtom(HWND remote_window,
2015-10-19 18:43:45 +00:00
bool fast_start);
// Changes the notification timeout to |new_timeout|, returns the old timeout.
base::TimeDelta SetNotificationTimeoutForTesting(base::TimeDelta new_timeout);
} // namespace chrome
2015-10-19 18:47:38 +00:00
#endif // ATOM_BROWSER_ATOM_PROCESS_FINDER_WIN_H_