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

Side by Side Diff: chrome/browser/gtk/import_progress_dialog_gtk.h

Issue 114047: Add import progress indicator dialog. (Closed)
Patch Set: code review fixes Created 11 years, 6 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 unified diff | Download patch
OLDNEW
(Empty)
1 // Copyright (c) 2009 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_GTK_IMPORT_PROGRESS_DIALOG_GTK_H_
6 #define CHROME_BROWSER_GTK_IMPORT_PROGRESS_DIALOG_GTK_H_
7
8 #include "chrome/browser/importer/importer.h"
9
10 #include <gtk/gtk.h>
11
12 #include "chrome/browser/profile.h"
13
14 class ImportProgressDialogGtk : public ImporterHost::Observer {
15 public:
16 // Displays the import progress dialog box and starts the import
17 static void StartImport(GtkWindow* parent, int16 items,
18 ImporterHost* importer_host,
19 const ProfileInfo& browser_profile,
20 Profile* profile,
21 ImportObserver* observer, bool first_run);
22
23 // Overridden from ImporterHost::Observer:
24 virtual void ImportItemStarted(ImportItem item);
25 virtual void ImportItemEnded(ImportItem item);
26 virtual void ImportStarted();
27 virtual void ImportEnded();
28
29 private:
30 ImportProgressDialogGtk(const string16& source_profile, int16 items,
31 ImporterHost* importer_host, ImportObserver* observer,
32 GtkWindow* parent, bool bookmarks_import);
33 ~ImportProgressDialogGtk() { }
34
35 static void HandleOnResponseDialog(GtkWidget* widget,
36 int response,
37 gpointer user_data) {
38 reinterpret_cast<ImportProgressDialogGtk*>(user_data)->OnDialogResponse(
39 widget, response);
40 }
41
42 void CloseDialog();
43
44 void OnDialogResponse(GtkWidget* widget, int response);
45
46 void ShowDialog();
47
48 // Parent window
49 GtkWindow* parent_;
50
51 // Import progress dialog
52 GtkWidget* dialog_;
53
54 // Bookmarks/Favorites checkbox
55 GtkWidget* bookmarks_;
56
57 // Search Engines checkbox
58 GtkWidget* search_engines_;
59
60 // Passwords checkbox
61 GtkWidget* passwords_;
62
63 // History checkbox
64 GtkWidget* history_;
65
66 // Boolean that tells whether we are currently in the mid of import process
67 bool importing_;
68
69 // Observer that we need to notify about import events
70 ImportObserver* observer_;
71
72 // Items to import from the other browser.
73 int16 items_;
74
75 // Utility class that does the actual import.
76 scoped_refptr<ImporterHost> importer_host_;
77
78 DISALLOW_COPY_AND_ASSIGN(ImportProgressDialogGtk);
79 };
80
81 #endif // CHROME_BROWSER_GTK_IMPORT_PROGRESS_DIALOG_GTK_H_
OLDNEW
« no previous file with comments | « chrome/browser/gtk/import_lock_dialog_gtk.cc ('k') | chrome/browser/gtk/import_progress_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698