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

Unified Diff: chrome/browser/ui/gtk/import_dialog_gtk.h

Issue 6099014: Move chrome/browser/gtk to chrome/browser/ui/gtk (Closed) Base URL: http://git.chromium.org/git/chromium.git@trunk
Patch Set: Move browser/gtk/ to browser/ui/gtk/, leave header stubs, update new header guards Created 9 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc ('k') | chrome/browser/ui/gtk/import_dialog_gtk.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/import_dialog_gtk.h
diff --git a/chrome/browser/ui/gtk/import_dialog_gtk.h b/chrome/browser/ui/gtk/import_dialog_gtk.h
new file mode 100644
index 0000000000000000000000000000000000000000..0d15f8e20edb9c2712942f4794fb83e211fb5e42
--- /dev/null
+++ b/chrome/browser/ui/gtk/import_dialog_gtk.h
@@ -0,0 +1,89 @@
+// Copyright (c) 2010 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_UI_GTK_IMPORT_DIALOG_GTK_H_
+#define CHROME_BROWSER_UI_GTK_IMPORT_DIALOG_GTK_H_
+#pragma once
+
+#include "app/gtk_signal.h"
+#include "chrome/browser/importer/importer.h"
+
+class AccessibleWidgetHelper;
+class Profile;
+
+class ImportDialogGtk : public ImportObserver,
+ public ImporterList::Observer {
+ public:
+ // Displays the import box to import data from another browser into |profile|
+ // |initial_state| is a bitmask of ImportItems. Each checkbox for the bits in
+ // is checked.
+ static void Show(GtkWindow* parent, Profile* profile, int initial_state);
+
+ // ImportObserver implementation.
+ virtual void ImportCanceled();
+ virtual void ImportComplete();
+
+ private:
+ ImportDialogGtk(GtkWindow* parent, Profile* profile, int initial_state);
+ ~ImportDialogGtk();
+
+ // ImporterList::Observer implementation.
+ virtual void SourceProfilesLoaded();
+
+ // Handler to respond to OK or Cancel responses from the dialog.
+ CHROMEGTK_CALLBACK_1(ImportDialogGtk, void, OnDialogResponse, int);
+
+ // Handler to respond to widget clicked actions from the dialog.
+ CHROMEGTK_CALLBACK_0(ImportDialogGtk, void, OnDialogWidgetClicked);
+
+ // Enable or disable the dialog buttons depending on the state of the
+ // checkboxes.
+ void UpdateDialogButtons();
+
+ // Sets the sensitivity of all controls on the dialog except the cancel
+ // button.
+ void SetDialogControlsSensitive(bool sensitive);
+
+ // Create a bitmask from the checkboxes of the dialog.
+ uint16 GetCheckedItems();
+
+ // Parent window
+ GtkWindow* parent_;
+
+ // Import Dialog
+ GtkWidget* dialog_;
+
+ // Combo box that displays list of profiles from which we can import.
+ GtkWidget* combo_;
+
+ // Bookmarks/Favorites checkbox
+ GtkWidget* bookmarks_;
+
+ // Search Engines checkbox
+ GtkWidget* search_engines_;
+
+ // Passwords checkbox
+ GtkWidget* passwords_;
+
+ // History checkbox
+ GtkWidget* history_;
+
+ // Import button.
+ GtkWidget* import_button_;
+
+ // Our current profile
+ Profile* profile_;
+
+ // Utility class that does the actual import.
+ scoped_refptr<ImporterHost> importer_host_;
+
+ int initial_state_;
+
+ // Helper object to manage accessibility metadata.
+ scoped_ptr<AccessibleWidgetHelper> accessible_widget_helper_;
+
+ DISALLOW_COPY_AND_ASSIGN(ImportDialogGtk);
+};
+
+#endif // CHROME_BROWSER_UI_GTK_IMPORT_DIALOG_GTK_H_
« no previous file with comments | « chrome/browser/ui/gtk/hung_renderer_dialog_gtk.cc ('k') | chrome/browser/ui/gtk/import_dialog_gtk.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698