| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 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 | 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_VIEWS_IMPORTER_IMPORT_PROGRESS_DIALOG_VIEW_H_ | 5 #ifndef CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_PROGRESS_DIALOG_VIEW_H_ |
| 6 #define CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_PROGRESS_DIALOG_VIEW_H_ | 6 #define CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_PROGRESS_DIALOG_VIEW_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" |
| (...skipping 11 matching lines...) Expand all Loading... |
| 22 class CheckmarkThrobber; | 22 class CheckmarkThrobber; |
| 23 class Label; | 23 class Label; |
| 24 } | 24 } |
| 25 | 25 |
| 26 class ImportProgressDialogView : public views::DialogDelegateView, | 26 class ImportProgressDialogView : public views::DialogDelegateView, |
| 27 public importer::ImporterProgressObserver { | 27 public importer::ImporterProgressObserver { |
| 28 public: | 28 public: |
| 29 // |items| is a bitmask of importer::ImportItem being imported. | 29 // |items| is a bitmask of importer::ImportItem being imported. |
| 30 // |bookmark_import| is true if we're importing bookmarks from a | 30 // |bookmark_import| is true if we're importing bookmarks from a |
| 31 // bookmarks.html file. | 31 // bookmarks.html file. |
| 32 ImportProgressDialogView(HWND parent_window, | 32 ImportProgressDialogView(uint16 items, |
| 33 uint16 items, | |
| 34 ImporterHost* importer_host, | 33 ImporterHost* importer_host, |
| 35 ImporterObserver* importer_observer, | 34 ImporterObserver* importer_observer, |
| 36 const string16& importer_name, | 35 const string16& importer_name, |
| 37 bool bookmarks_import); | 36 bool bookmarks_import); |
| 38 virtual ~ImportProgressDialogView(); | 37 virtual ~ImportProgressDialogView(); |
| 39 | 38 |
| 40 protected: | 39 protected: |
| 41 // views::View: | 40 // views::View: |
| 42 virtual gfx::Size GetPreferredSize() OVERRIDE; | 41 virtual gfx::Size GetPreferredSize() OVERRIDE; |
| 43 virtual void ViewHierarchyChanged(bool is_add, | 42 virtual void ViewHierarchyChanged(bool is_add, |
| 44 views::View* parent, | 43 views::View* parent, |
| 45 views::View* child) OVERRIDE; | 44 views::View* child) OVERRIDE; |
| 46 | 45 |
| 47 // views::DialogDelegate: | 46 // views::DialogDelegate: |
| 48 virtual int GetDialogButtons() const OVERRIDE; | 47 virtual int GetDialogButtons() const OVERRIDE; |
| 49 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; | 48 virtual string16 GetDialogButtonLabel(ui::DialogButton button) const OVERRIDE; |
| 50 virtual ui::ModalType GetModalType() const OVERRIDE; | |
| 51 virtual string16 GetWindowTitle() const OVERRIDE; | 49 virtual string16 GetWindowTitle() const OVERRIDE; |
| 52 virtual bool Cancel() OVERRIDE; | 50 virtual bool Cancel() OVERRIDE; |
| 53 virtual views::View* GetContentsView() OVERRIDE; | 51 virtual views::View* GetContentsView() OVERRIDE; |
| 54 | 52 |
| 55 private: | 53 private: |
| 56 // Set up the control layout within this dialog. | 54 // Set up the control layout within this dialog. |
| 57 void InitControlLayout(); | 55 void InitControlLayout(); |
| 58 | 56 |
| 59 // importer::ImporterProgressObserver: | 57 // importer::ImporterProgressObserver: |
| 60 virtual void ImportStarted() OVERRIDE; | 58 virtual void ImportStarted() OVERRIDE; |
| 61 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE; | 59 virtual void ImportItemStarted(importer::ImportItem item) OVERRIDE; |
| 62 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE; | 60 virtual void ImportItemEnded(importer::ImportItem item) OVERRIDE; |
| 63 virtual void ImportEnded() OVERRIDE; | 61 virtual void ImportEnded() OVERRIDE; |
| 64 | 62 |
| 65 // The native window that we are parented to. Can be NULL. | |
| 66 HWND parent_window_; | |
| 67 | |
| 68 // Various dialog controls. | 63 // Various dialog controls. |
| 69 scoped_ptr<views::CheckmarkThrobber> state_bookmarks_; | 64 scoped_ptr<views::CheckmarkThrobber> state_bookmarks_; |
| 70 scoped_ptr<views::CheckmarkThrobber> state_searches_; | 65 scoped_ptr<views::CheckmarkThrobber> state_searches_; |
| 71 scoped_ptr<views::CheckmarkThrobber> state_passwords_; | 66 scoped_ptr<views::CheckmarkThrobber> state_passwords_; |
| 72 scoped_ptr<views::CheckmarkThrobber> state_history_; | 67 scoped_ptr<views::CheckmarkThrobber> state_history_; |
| 73 scoped_ptr<views::CheckmarkThrobber> state_cookies_; | 68 scoped_ptr<views::CheckmarkThrobber> state_cookies_; |
| 74 views::Label* label_info_; | 69 views::Label* label_info_; |
| 75 scoped_ptr<views::Label> label_bookmarks_; | 70 scoped_ptr<views::Label> label_bookmarks_; |
| 76 scoped_ptr<views::Label> label_searches_; | 71 scoped_ptr<views::Label> label_searches_; |
| 77 scoped_ptr<views::Label> label_passwords_; | 72 scoped_ptr<views::Label> label_passwords_; |
| (...skipping 12 matching lines...) Expand all Loading... |
| 90 // True if the import operation is in progress. | 85 // True if the import operation is in progress. |
| 91 bool importing_; | 86 bool importing_; |
| 92 | 87 |
| 93 // Are we importing a bookmarks.html file? | 88 // Are we importing a bookmarks.html file? |
| 94 bool bookmarks_import_; | 89 bool bookmarks_import_; |
| 95 | 90 |
| 96 DISALLOW_COPY_AND_ASSIGN(ImportProgressDialogView); | 91 DISALLOW_COPY_AND_ASSIGN(ImportProgressDialogView); |
| 97 }; | 92 }; |
| 98 | 93 |
| 99 #endif // CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_PROGRESS_DIALOG_VIEW_H_ | 94 #endif // CHROME_BROWSER_UI_VIEWS_IMPORTER_IMPORT_PROGRESS_DIALOG_VIEW_H_ |
| OLD | NEW |