summaryrefslogtreecommitdiffstats
path: root/chrome/browser/process_singleton.h
diff options
context:
space:
mode:
authorrobertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-03 15:57:53 +0000
committerrobertshield@google.com <robertshield@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-05-03 15:57:53 +0000
commit175a7a296b06339ee76d59fd8a98507b59aa2187 (patch)
tree66bc8cd9dd376252e266b6e7621f6a439f04128a /chrome/browser/process_singleton.h
parent537a1e191f7666d12c486a4054abd661b6c1d3a1 (diff)
downloadchromium_src-175a7a296b06339ee76d59fd8a98507b59aa2187.zip
chromium_src-175a7a296b06339ee76d59fd8a98507b59aa2187.tar.gz
chromium_src-175a7a296b06339ee76d59fd8a98507b59aa2187.tar.bz2
Fix multiple instances of first run dialog appearing when Chrome is started again while a first run dialog is visible. Also cause the original first run dialog to come to foreground.
BUG=http://crbug.com/10765 Review URL: http://codereview.chromium.org/99281 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@15170 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/process_singleton.h')
-rw-r--r--chrome/browser/process_singleton.h12
1 files changed, 9 insertions, 3 deletions
diff --git a/chrome/browser/process_singleton.h b/chrome/browser/process_singleton.h
index b5f3631..0e39417 100644
--- a/chrome/browser/process_singleton.h
+++ b/chrome/browser/process_singleton.h
@@ -13,6 +13,7 @@
#include "base/basictypes.h"
#include "base/file_path.h"
+#include "base/gfx/native_widget_types.h"
// ProcessSingleton ----------------------------------------------------------
//
@@ -42,18 +43,23 @@ class ProcessSingleton {
// Set ourselves up as the singleton instance.
void Create();
- // Blocks the dispatch of CopyData messages.
- void Lock() {
+ // 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) {
locked_ = true;
+ foreground_window_ = foreground_window;
}
// Allows the dispatch of CopyData messages.
void Unlock() {
locked_ = false;
+ foreground_window_ = NULL;
}
private:
bool locked_;
+ gfx::NativeWindow foreground_window_;
#if defined(OS_WIN)
// This ugly behemoth handles startup commands sent from another process.
@@ -86,4 +92,4 @@ class ProcessSingleton {
DISALLOW_COPY_AND_ASSIGN(ProcessSingleton);
};
-#endif // #ifndef CHROME_BROWSER_PROCESS_SINGLETON_H_
+#endif // CHROME_BROWSER_PROCESS_SINGLETON_H_