diff options
author | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-21 21:08:08 +0000 |
---|---|---|
committer | mattm@chromium.org <mattm@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-08-21 21:08:08 +0000 |
commit | 6f926fd60310acd3bac1ecc36dcb4394633b9a41 (patch) | |
tree | 562b204fdba8e602d1210e07f36acc9212c83a34 /chrome/browser/gtk/process_singleton_dialog.h | |
parent | 77c2af208b64e6b8c128efe79c05932d63d33571 (diff) | |
download | chromium_src-6f926fd60310acd3bac1ecc36dcb4394633b9a41.zip chromium_src-6f926fd60310acd3bac1ecc36dcb4394633b9a41.tar.gz chromium_src-6f926fd60310acd3bac1ecc36dcb4394633b9a41.tar.bz2 |
Gtk: Add error dialog when profile was in use on a different computer.
BUG=17549
TEST=see bug
Review URL: http://codereview.chromium.org/173222
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@24008 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/gtk/process_singleton_dialog.h')
-rw-r--r-- | chrome/browser/gtk/process_singleton_dialog.h | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/chrome/browser/gtk/process_singleton_dialog.h b/chrome/browser/gtk/process_singleton_dialog.h new file mode 100644 index 0000000..fa303e2 --- /dev/null +++ b/chrome/browser/gtk/process_singleton_dialog.h @@ -0,0 +1,34 @@ +// Copyright (c) 2009 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. + +#ifndef CHROME_BROWSER_GTK_PROCESS_SINGLETON_DIALOG_H_ +#define CHROME_BROWSER_GTK_PROCESS_SINGLETON_DIALOG_H_ + +#include <string> + +#include <gtk/gtk.h> + +#include "base/basictypes.h" + +// Displays an error to the user when the ProcessSingleton cannot acquire the +// lock. This runs the message loop itself as the browser message loop has not +// started by that point in the startup process. +class ProcessSingletonDialog { + public: + // Shows the dialog, and returns once the dialog has been closed. + static void ShowAndRun(const std::string& message); + + private: + explicit ProcessSingletonDialog(const std::string& message); + + static void OnResponse(GtkWidget* widget, + int response, + ProcessSingletonDialog* dialog); + + GtkWidget* dialog_; + + DISALLOW_COPY_AND_ASSIGN(ProcessSingletonDialog); +}; + +#endif // CHROME_BROWSER_GTK_PROCESS_SINGLETON_DIALOG_H_ |