diff --git a/atom/browser/chrome_process_finder_win.cc b/atom/browser/atom_process_finder_win.cc similarity index 89% rename from atom/browser/chrome_process_finder_win.cc rename to atom/browser/atom_process_finder_win.cc index 13c4a0eb5a56..df2d736d3e63 100644 --- a/atom/browser/chrome_process_finder_win.cc +++ b/atom/browser/atom_process_finder_win.cc @@ -2,7 +2,7 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#include "chrome/browser/chrome_process_finder_win.h" +#include "atom/browser/atom_process_finder_win.h" #include #include @@ -20,8 +20,6 @@ #include "base/win/scoped_handle.h" #include "base/win/win_util.h" #include "base/win/windows_version.h" -#include "chrome/common/chrome_constants.h" -#include "chrome/common/chrome_switches.h" namespace { @@ -30,14 +28,14 @@ int timeout_in_milliseconds = 20 * 1000; } // namespace -namespace chrome { +namespace atom { -HWND FindRunningChromeWindow(const base::FilePath& user_data_dir) { +HWND FindRunningAtomWindow(const base::FilePath& user_data_dir) { return base::win::MessageWindow::FindWindow(user_data_dir.value()); } -NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window, - bool fast_start) { +NotifyChromeResult AttemptToNotifyRunningAtom(HWND remote_window, + bool fast_start) { DCHECK(remote_window); DWORD process_id = 0; DWORD thread_id = GetWindowThreadProcessId(remote_window, &process_id); diff --git a/atom/browser/chrome_process_finder_win.h b/atom/browser/atom_process_finder_win.h similarity index 74% rename from atom/browser/chrome_process_finder_win.h rename to atom/browser/atom_process_finder_win.h index a66429de5e74..f8aa72fdd956 100644 --- a/atom/browser/chrome_process_finder_win.h +++ b/atom/browser/atom_process_finder_win.h @@ -2,8 +2,8 @@ // Use of this source code is governed by a BSD-style license that can be // found in the LICENSE file. -#ifndef CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_ -#define CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_ +#ifndef ATOM_BROWSER_ATOM_PROCESS_FINDER_WIN_H_ +#define ATOM_BROWSER_ATOM_PROCESS_FINDER_WIN_H_ #include @@ -13,7 +13,7 @@ namespace base { class FilePath; } -namespace chrome { +namespace atom { enum NotifyChromeResult { NOTIFY_SUCCESS, @@ -22,13 +22,13 @@ enum NotifyChromeResult { }; // Finds an already running Chrome window if it exists. -HWND FindRunningChromeWindow(const base::FilePath& user_data_dir); +HWND FindRunningAtomWindow(const base::FilePath& user_data_dir); // 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. -NotifyChromeResult AttemptToNotifyRunningChrome(HWND remote_window, +NotifyChromeResult AttemptToNotifyRunningAtom(HWND remote_window, bool fast_start); // Changes the notification timeout to |new_timeout|, returns the old timeout. @@ -36,4 +36,4 @@ base::TimeDelta SetNotificationTimeoutForTesting(base::TimeDelta new_timeout); } // namespace chrome -#endif // CHROME_BROWSER_CHROME_PROCESS_FINDER_WIN_H_ +#endif // ATOM_BROWSER_ATOM_PROCESS_FINDER_WIN_H_ diff --git a/filenames.gypi b/filenames.gypi index 17d1b3597c41..0dce079b5ec6 100644 --- a/filenames.gypi +++ b/filenames.gypi @@ -128,6 +128,7 @@ 'atom/browser/atom_browser_main_parts.h', 'atom/browser/atom_browser_main_parts_mac.mm', 'atom/browser/atom_browser_main_parts_posix.cc', + 'atom/browser/atom_process_finder_win.cc', 'atom/browser/atom_javascript_dialog_manager.cc', 'atom/browser/atom_javascript_dialog_manager.h', 'atom/browser/atom_quota_permission_context.cc',