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

Side by Side Diff: chrome/browser/ui/views/importer/import_progress_dialog_view.h

Issue 14322002: Remove unused ImportProgressDialog. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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 | Annotate | Revision Log
OLDNEW
(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_VIEWS_IMPORTER_IMPORT_PROGRESS_DIALOG_VIEW_H_
6 #define CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_PROGRESS_DIALOG_VIEW_H_
7
8 #include "base/basictypes.h"
9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h"
11 #include "base/memory/scoped_ptr.h"
12 #include "chrome/browser/importer/importer_data_types.h"
13 #include "chrome/browser/importer/importer_progress_observer.h"
14 #include "ui/views/view.h"
15 #include "ui/views/window/dialog_delegate.h"
16
17 class ImporterHost;
18 class ImporterObserver;
19
20 namespace views {
21 class CheckmarkThrobber;
22 class Label;
23 }
24
25 class ImportProgressDialogView : public views::DialogDelegateView,
26 public importer::ImporterProgressObserver {
27 public:
28 // |items| is a bitmask of importer::ImportItem being imported.
29 // |bookmark_import| is true if we're importing bookmarks from a
30 // bookmarks.html file.
31 ImportProgressDialogView(uint16 items,
32 ImporterHost* importer_host,
33 ImporterObserver* importer_observer,
34 const string16& importer_name,
35 bool bookmarks_import);
36 virtual ~ImportProgressDialogView();
37
38 protected:
39 // views::View:
40 virtual gfx::Size GetPreferredSize() OVERRIDE;
41 virtual void ViewHierarchyChanged(bool is_add,
42 views::View* parent,
43 views::View* child) OVERRIDE;
44
45 // views::DialogDelegate:
46 virtual int GetDialogButtons() const OVERRIDE;
47 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE;
48 virtual string16 GetWindowTitle() const OVERRIDE;
49 virtual bool Cancel() OVERRIDE;
50
51 private:
52 // Set up the control layout within this dialog.
53 void InitControlLayout();
54
55 // importer::ImporterProgressObserver:
56 virtual void ImportStarted() OVERRIDE;
57 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE;
58 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE;
59 virtual void ImportEnded() OVERRIDE;
60
61 // Various dialog controls.
62 scoped_ptr<views::CheckmarkThrobber> state_bookmarks_;
63 scoped_ptr<views::CheckmarkThrobber> state_searches_;
64 scoped_ptr<views::CheckmarkThrobber> state_passwords_;
65 scoped_ptr<views::CheckmarkThrobber> state_history_;
66 scoped_ptr<views::CheckmarkThrobber> state_cookies_;
67 views::Label* label_info_;
68 scoped_ptr<views::Label> label_bookmarks_;
69 scoped_ptr<views::Label> label_searches_;
70 scoped_ptr<views::Label> label_passwords_;
71 scoped_ptr<views::Label> label_history_;
72 scoped_ptr<views::Label> label_cookies_;
73
74 // Items to import from the other browser
75 uint16 items_;
76
77 // Utility class that does the actual import.
78 scoped_refptr<ImporterHost> importer_host_;
79
80 // Observer that we need to notify about import events.
81 ImporterObserver* importer_observer_;
82
83 // True if the import operation is in progress.
84 bool importing_;
85
86 // Are we importing a bookmarks.html file?
87 bool bookmarks_import_;
88
89 DISALLOW_COPY_AND_ASSIGN(ImportProgressDialogView);
90 };
91
92 #endif // CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_PROGRESS_DIALOG_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698