1ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen// Copyright (c) 2011 The Chromium Authors. All rights reserved. 2ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen// Use of this source code is governed by a BSD-style license that can be 3ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen// found in the LICENSE file. 4ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen 5ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen#ifndef CHROME_BROWSER_BROWSER_UTIL_WIN_H_ 6ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen#define CHROME_BROWSER_BROWSER_UTIL_WIN_H_ 7ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen#pragma once 8ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen 9ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsennamespace browser_util { 10ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen 11ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen// Check if current chrome.exe is already running as a browser process by trying 12ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen// to create a Global event with name same as full path of chrome.exe. This 13ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen// method caches the handle to this event so on subsequent calls also it can 14ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen// first close the handle and check for any other process holding the handle to 15ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen// the event. 16ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsenbool IsBrowserAlreadyRunning(); 17ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen 18ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen} // namespace browser_util 19ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen 20ddb351dbec246cf1fab5ec20d2d5520909041de1Kristian Monsen#endif // CHROME_BROWSER_BROWSER_UTIL_WIN_H_ 21