| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef CHROME_BROWSER_UI_GTK_IMPORTER_IMPORT_PROGRESS_DIALOG_GTK_H_ | 5 #ifndef CHROME_BROWSER_UI_GTK_IMPORTER_IMPORT_PROGRESS_DIALOG_GTK_H_ |
| 6 #define CHROME_BROWSER_UI_GTK_IMPORTER_IMPORT_PROGRESS_DIALOG_GTK_H_ | 6 #define CHROME_BROWSER_UI_GTK_IMPORTER_IMPORT_PROGRESS_DIALOG_GTK_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/compiler_specific.h" | 10 #include "base/compiler_specific.h" |
| 11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
| 12 #include "chrome/browser/importer/importer_data_types.h" | 12 #include "chrome/browser/importer/importer_data_types.h" |
| 13 #include "chrome/browser/importer/importer_progress_observer.h" | 13 #include "chrome/browser/importer/importer_progress_observer.h" |
| 14 #include "ui/base/gtk/gtk_signal.h" | 14 #include "ui/base/gtk/gtk_signal.h" |
| 15 | 15 |
| 16 class ImporterHost; | 16 class ImporterHost; |
| 17 class ImporterObserver; | 17 class ImporterObserver; |
| 18 class Profile; | 18 class Profile; |
| 19 | 19 |
| 20 typedef struct _GtkWidget Widget; | 20 typedef struct _GtkWidget Widget; |
| 21 typedef struct _GtkWindow GtkWindow; | 21 typedef struct _GtkWindow GtkWindow; |
| 22 | 22 |
| 23 class ImportProgressDialogGtk : public importer::ImporterProgressObserver { | 23 class ImportProgressDialogGtk : public importer::ImporterProgressObserver { |
| 24 public: | 24 public: |
| 25 // Displays the import progress dialog box and starts the import process. | 25 // Displays the import progress dialog box and starts the import process. |
| 26 static void StartImport(GtkWindow* parent, | 26 static void StartImport(uint16 items, |
| 27 uint16 items, | |
| 28 ImporterHost* importer_host, | 27 ImporterHost* importer_host, |
| 29 ImporterObserver* importer_observer, | 28 ImporterObserver* importer_observer, |
| 30 const importer::SourceProfile& source_profile, | 29 const importer::SourceProfile& source_profile, |
| 31 Profile* profile, | 30 Profile* profile, |
| 32 bool first_run); | 31 bool first_run); |
| 33 | 32 |
| 34 private: | 33 private: |
| 35 ImportProgressDialogGtk(GtkWindow* parent, | 34 ImportProgressDialogGtk(uint16 items, |
| 36 uint16 items, | |
| 37 ImporterHost* importer_host, | 35 ImporterHost* importer_host, |
| 38 ImporterObserver* importer_observer, | 36 ImporterObserver* importer_observer, |
| 39 const string16& importer_name, | 37 const string16& importer_name, |
| 40 bool bookmarks_import); | 38 bool bookmarks_import); |
| 41 virtual ~ImportProgressDialogGtk(); | 39 virtual ~ImportProgressDialogGtk(); |
| 42 | 40 |
| 43 CHROMEGTK_CALLBACK_1(ImportProgressDialogGtk, void, OnResponse, int); | 41 CHROMEGTK_CALLBACK_1(ImportProgressDialogGtk, void, OnResponse, int); |
| 44 | 42 |
| 45 void ShowDialog(); | 43 void ShowDialog(); |
| 46 | 44 |
| 47 void CloseDialog(); | 45 void CloseDialog(); |
| 48 | 46 |
| 49 // importer::ImporterProgressObserver: | 47 // importer::ImporterProgressObserver: |
| 50 virtual void ImportStarted() OVERRIDE; | 48 virtual void ImportStarted() OVERRIDE; |
| 51 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE; | 49 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE; |
| 52 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE; | 50 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE; |
| 53 virtual void ImportEnded() OVERRIDE; | 51 virtual void ImportEnded() OVERRIDE; |
| 54 | 52 |
| 55 // Parent window. | |
| 56 GtkWindow* parent_; | |
| 57 | |
| 58 // Import progress dialog. | 53 // Import progress dialog. |
| 59 GtkWidget* dialog_; | 54 GtkWidget* dialog_; |
| 60 | 55 |
| 61 // Bookmarks/Favorites checkbox. | 56 // Bookmarks/Favorites checkbox. |
| 62 GtkWidget* bookmarks_; | 57 GtkWidget* bookmarks_; |
| 63 | 58 |
| 64 // Search Engines checkbox. | 59 // Search Engines checkbox. |
| 65 GtkWidget* search_engines_; | 60 GtkWidget* search_engines_; |
| 66 | 61 |
| 67 // Passwords checkbox. | 62 // Passwords checkbox. |
| (...skipping 11 matching lines...) Expand all Loading... |
| 79 // Observer that we need to notify about import events. | 74 // Observer that we need to notify about import events. |
| 80 ImporterObserver* importer_observer_; | 75 ImporterObserver* importer_observer_; |
| 81 | 76 |
| 82 // True if the import operation is in progress. | 77 // True if the import operation is in progress. |
| 83 bool importing_; | 78 bool importing_; |
| 84 | 79 |
| 85 DISALLOW_COPY_AND_ASSIGN(ImportProgressDialogGtk); | 80 DISALLOW_COPY_AND_ASSIGN(ImportProgressDialogGtk); |
| 86 }; | 81 }; |
| 87 | 82 |
| 88 #endif // CHROME_BROWSER_UI_GTK_IMPORTER_IMPORT_PROGRESS_DIALOG_GTK_H_ | 83 #endif // CHROME_BROWSER_UI_GTK_IMPORTER_IMPORT_PROGRESS_DIALOG_GTK_H_ |
| OLD | NEW |