Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(5988)

Unified Diff: chrome/browser/process_singleton.h

Issue 12096114: Extract locking behaviour from ProcessSingleton. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix non-windows compile. Created 7 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: chrome/browser/process_singleton.h
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
index 261743597c96f2d1aa942ac965bb21a225334297..04759078bcce7d62081ff4b330e8078fbf8a7027 100644
--- a/chrome/browser/process_singleton.h
+++ b/chrome/browser/process_singleton.h
@@ -84,30 +84,6 @@ class ProcessSingleton : public base::NonThreadSafe {
// Clear any lock state during shutdown.
void Cleanup();
- // Blocks the dispatch of CopyData messages. foreground_window refers
- // to the window that should be set to the foreground if a CopyData message
- // is received while the ProcessSingleton is locked.
- void Lock(gfx::NativeWindow foreground_window) {
- DCHECK(CalledOnValidThread());
- locked_ = true;
- foreground_window_ = foreground_window;
- }
-
- // Changes the foreground window without changing the locked state.
- void SetForegroundWindow(gfx::NativeWindow foreground_window) {
- DCHECK(CalledOnValidThread());
- foreground_window_ = foreground_window;
- }
-
- // Allows the dispatch of CopyData messages and replays the messages which
- // were received when the ProcessSingleton was locked.
- void Unlock();
-
- bool locked() {
- DCHECK(CalledOnValidThread());
- return locked_;
- }
-
#if defined(OS_WIN)
LRESULT WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
#endif
@@ -138,16 +114,12 @@ class ProcessSingleton : public base::NonThreadSafe {
#endif // defined(OS_LINUX) || defined(OS_OPENBSD)
private:
- typedef std::pair<CommandLine::StringVector,
- base::FilePath> DelayedStartupMessage;
-
#if !defined(OS_MACOSX)
// Timeout for the current browser process to respond. 20 seconds should be
// enough. It's only used in Windows and Linux implementations.
static const int kTimeoutInSeconds = 20;
#endif
- bool locked_;
gfx::NativeWindow foreground_window_;
NotificationCallback notification_callback_; // Handler for notifications.
@@ -157,8 +129,6 @@ class ProcessSingleton : public base::NonThreadSafe {
bool EscapeVirtualization(const base::FilePath& user_data_dir);
- virtual void DoSetForegroundWindow(HWND target_window);
-
HWND remote_window_; // The HWND_MESSAGE of another browser.
HWND window_; // The HWND_MESSAGE window.
bool is_virtualized_; // Stuck inside Microsoft Softricity VM environment.
@@ -213,10 +183,6 @@ class ProcessSingleton : public base::NonThreadSafe {
int lock_fd_;
#endif
- // If messages are received in the locked state, the corresponding command
- // lines are saved here to be replayed later.
- std::vector<DelayedStartupMessage> saved_startup_messages_;
-
DISALLOW_COPY_AND_ASSIGN(ProcessSingleton);
};

Powered by Google App Engine
This is Rietveld 408576698