1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 2 // Use of this source code is governed by a BSD-style license that can be 3 // found in the LICENSE file. 4 5 #ifndef CHROME_BROWSER_UI_GTK_IMPORTER_IMPORT_LOCK_DIALOG_GTK_H_ 6 #define CHROME_BROWSER_UI_GTK_IMPORTER_IMPORT_LOCK_DIALOG_GTK_H_ 7 8 #include "base/basictypes.h" 9 #include "base/callback.h" 10 #include "base/memory/ref_counted.h" 11 #include "ui/base/gtk/gtk_signal.h" 12 13 typedef struct _GtkWidget GtkWidget; 14 typedef struct _GtkWindow GtkWindow; 15 16 // ImportLockDialogGtk presents the dialog which asks the user to shut down 17 // Firefox before starting the profile import. 18 class ImportLockDialogGtk { 19 public: 20 static void Show(GtkWindow* parent, 21 const base::Callback<void(bool)>& callback); 22 23 private: 24 ImportLockDialogGtk(GtkWindow* parent, 25 const base::Callback<void(bool)>& callback); 26 ~ImportLockDialogGtk(); 27 28 CHROMEGTK_CALLBACK_1(ImportLockDialogGtk, void, OnResponse, int); 29 30 // Import lock dialog. 31 GtkWidget* dialog_; 32 33 // Called with the result of the dialog. 34 base::Callback<void(bool)> callback_; 35 36 DISALLOW_COPY_AND_ASSIGN(ImportLockDialogGtk); 37 }; 38 39 #endif // CHROME_BROWSER_UI_GTK_IMPORTER_IMPORT_LOCK_DIALOG_GTK_H_ 40