Index: chrome/browser/gtk/first_run_dialog.h |
diff --git a/chrome/browser/gtk/first_run_dialog.h b/chrome/browser/gtk/first_run_dialog.h |
index fcc7e4a94734bee1dd4c2c869a6273056e6272f4..de24b461f92edafe3a929683d1f80543f118dc38 100644 |
--- a/chrome/browser/gtk/first_run_dialog.h |
+++ b/chrome/browser/gtk/first_run_dialog.h |
@@ -12,50 +12,65 @@ typedef struct _GtkWidget GtkWidget; |
#include "app/gtk_signal.h" |
#include "chrome/browser/first_run/first_run.h" |
#include "chrome/browser/importer/importer.h" |
+#include "chrome/browser/search_engines/template_url_model.h" |
-class FirstRunDialog : public ImportObserver { |
+class FirstRunDialog : public ImporterHost::Observer, |
+ public TemplateURLModelObserver { |
public: |
// Displays the first run UI for reporting opt-in, import data etc. |
static bool Show(Profile* profile, ProcessSingleton* process_singleton); |
- // Overridden from ImportObserver: |
- virtual void ImportCanceled() { |
- FirstRunDone(); |
- } |
- virtual void ImportComplete() { |
- FirstRunDone(); |
- } |
+ // Overridden from ImporterHost::Observer ------------------------------------ |
+ virtual void ImportEnded(); |
+ virtual void ImportStarted() {} |
+ virtual void ImportItemStarted(importer::ImportItem item) {} |
+ virtual void ImportItemEnded(importer::ImportItem item) {} |
+ |
+ virtual void OnTemplateURLModelChanged(); |
private: |
FirstRunDialog(Profile* profile, int& response); |
- ~FirstRunDialog() {} |
+ virtual ~FirstRunDialog(); |
CHROMEGTK_CALLBACK_1(FirstRunDialog, void, OnResponseDialog, int); |
+ CHROMEGTK_CALLBACK_0(FirstRunDialog, void, OnSearchEngineButtonClicked); |
+ CHROMEGTK_CALLBACK_0(FirstRunDialog, void, OnSearchEngineWindowDestroy); |
CHROMEG_CALLBACK_0(FirstRunDialog, void, OnLearnMoreLinkClicked, GtkButton*); |
+ void ShowSearchEngineWindow(); |
+ void ShowDialog(); |
+ |
// This method closes the first run window and quits the message loop so that |
// the Chrome startup can continue. This should be called when all the |
// first run tasks are done. |
void FirstRunDone(); |
- // First Run UI Dialog |
+ // The search engine choice window. This is created and shown before |
+ // |dialog_|. |
+ GtkWidget* search_engine_window_; |
+ |
+ // Dialog that holds the bug reporting and default browser checkboxes. |
GtkWidget* dialog_; |
+ // Container for the search engine choices. |
+ GtkWidget* search_engine_hbox_; |
+ |
// Crash reporting checkbox |
GtkWidget* report_crashes_; |
// Make browser default checkbox |
GtkWidget* make_default_; |
- // Import data checkbox |
- GtkWidget* import_data_; |
- |
- // Combo box that displays list of profiles from which we can import. |
- GtkWidget* import_profile_; |
- |
// Our current profile |
Profile* profile_; |
+ // Owned by the profile_. |
+ TemplateURLModel* search_engines_model_; |
+ |
+ // The search engine the user chose, or NULL if the user has not chosen a |
+ // search engine. |
+ TemplateURL* chosen_search_engine_; |
+ |
// User response (accept or cancel) is returned through this. |
int& response_; |