| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2012 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_PROGRESS_DIALOG_GTK_H_ | |
| 6 #define CHROME_BROWSER_UI_GTK_IMPORTER_IMPORT_PROGRESS_DIALOG_GTK_H_ | |
| 7 | |
| 8 #include "base/basictypes.h" | |
| 9 #include "base/compiler_specific.h" | |
| 10 #include "base/memory/ref_counted.h" | |
| 11 #include "chrome/browser/importer/importer_data_types.h" | |
| 12 #include "chrome/browser/importer/importer_progress_observer.h" | |
| 13 #include "ui/base/gtk/gtk_signal.h" | |
| 14 | |
| 15 class ImporterHost; | |
| 16 class ImporterObserver; | |
| 17 class Profile; | |
| 18 | |
| 19 typedef struct _GtkWidget Widget; | |
| 20 typedef struct _GtkWindow GtkWindow; | |
| 21 | |
| 22 class ImportProgressDialogGtk : public importer::ImporterProgressObserver { | |
| 23 public: | |
| 24 // Displays the import progress dialog box and starts the import process. | |
| 25 static void StartImport(uint16 items, | |
| 26 ImporterHost* importer_host, | |
| 27 ImporterObserver* importer_observer, | |
| 28 const importer::SourceProfile& source_profile, | |
| 29 Profile* profile, | |
| 30 bool first_run); | |
| 31 | |
| 32 private: | |
| 33 ImportProgressDialogGtk(uint16 items, | |
| 34 ImporterHost* importer_host, | |
| 35 ImporterObserver* importer_observer, | |
| 36 const string16& importer_name, | |
| 37 bool bookmarks_import); | |
| 38 virtual ~ImportProgressDialogGtk(); | |
| 39 | |
| 40 CHROMEGTK_CALLBACK_1(ImportProgressDialogGtk, void, OnResponse, int); | |
| 41 | |
| 42 void ShowDialog(); | |
| 43 | |
| 44 void CloseDialog(); | |
| 45 | |
| 46 // importer::ImporterProgressObserver: | |
| 47 virtual void ImportStarted() OVERRIDE; | |
| 48 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE; | |
| 49 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE; | |
| 50 virtual void ImportEnded() OVERRIDE; | |
| 51 | |
| 52 // Import progress dialog. | |
| 53 GtkWidget* dialog_; | |
| 54 | |
| 55 // Bookmarks/Favorites checkbox. | |
| 56 GtkWidget* bookmarks_; | |
| 57 | |
| 58 // Search Engines checkbox. | |
| 59 GtkWidget* search_engines_; | |
| 60 | |
| 61 // Passwords checkbox. | |
| 62 GtkWidget* passwords_; | |
| 63 | |
| 64 // History checkbox. | |
| 65 GtkWidget* history_; | |
| 66 | |
| 67 // Items to import from the other browser. | |
| 68 uint16 items_; | |
| 69 | |
| 70 // Utility class that does the actual import. | |
| 71 scoped_refptr<ImporterHost> importer_host_; | |
| 72 | |
| 73 // Observer that we need to notify about import events. | |
| 74 ImporterObserver* importer_observer_; | |
| 75 | |
| 76 // True if the import operation is in progress. | |
| 77 bool importing_; | |
| 78 | |
| 79 DISALLOW_COPY_AND_ASSIGN(ImportProgressDialogGtk); | |
| 80 }; | |
| 81 | |
| 82 #endif // CHROME_BROWSER_UI_GTK_IMPORTER_IMPORT_PROGRESS_DIALOG_GTK_H_ | |
| OLD | NEW |