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_WEBUI_OPTIONS_IMPORT_DATA_HANDLER_H_ | 5 #ifndef CHROME_BROWSER_UI_WEBUI_OPTIONS_IMPORT_DATA_HANDLER_H_ |
6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_IMPORT_DATA_HANDLER_H_ | 6 #define CHROME_BROWSER_UI_WEBUI_OPTIONS_IMPORT_DATA_HANDLER_H_ |
7 | 7 |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
| 10 #include <memory> |
| 11 |
10 #include "base/compiler_specific.h" | 12 #include "base/compiler_specific.h" |
11 #include "base/macros.h" | 13 #include "base/macros.h" |
12 #include "base/memory/scoped_ptr.h" | |
13 #include "chrome/browser/importer/importer_progress_observer.h" | 14 #include "chrome/browser/importer/importer_progress_observer.h" |
14 #include "chrome/browser/ui/webui/options/options_ui.h" | 15 #include "chrome/browser/ui/webui/options/options_ui.h" |
15 #include "chrome/common/importer/importer_data_types.h" | 16 #include "chrome/common/importer/importer_data_types.h" |
16 #include "ui/shell_dialogs/select_file_dialog.h" | 17 #include "ui/shell_dialogs/select_file_dialog.h" |
17 | 18 |
18 class ExternalProcessImporterHost; | 19 class ExternalProcessImporterHost; |
19 class ImporterList; | 20 class ImporterList; |
20 | 21 |
21 namespace options { | 22 namespace options { |
22 | 23 |
(...skipping 26 matching lines...) Expand all Loading... |
49 void ImportEnded() override; | 50 void ImportEnded() override; |
50 | 51 |
51 // ui::SelectFileDialog::Listener: | 52 // ui::SelectFileDialog::Listener: |
52 void FileSelected(const base::FilePath& path, | 53 void FileSelected(const base::FilePath& path, |
53 int index, | 54 int index, |
54 void* params) override; | 55 void* params) override; |
55 | 56 |
56 // Opens a file selection dialog to choose the bookmarks HTML file. | 57 // Opens a file selection dialog to choose the bookmarks HTML file. |
57 void HandleChooseBookmarksFile(const base::ListValue* args); | 58 void HandleChooseBookmarksFile(const base::ListValue* args); |
58 | 59 |
59 scoped_ptr<ImporterList> importer_list_; | 60 std::unique_ptr<ImporterList> importer_list_; |
60 | 61 |
61 // If non-null it means importing is in progress. ImporterHost takes care | 62 // If non-null it means importing is in progress. ImporterHost takes care |
62 // of deleting itself when import is complete. | 63 // of deleting itself when import is complete. |
63 ExternalProcessImporterHost* importer_host_; // weak | 64 ExternalProcessImporterHost* importer_host_; // weak |
64 | 65 |
65 bool import_did_succeed_; | 66 bool import_did_succeed_; |
66 | 67 |
67 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; | 68 scoped_refptr<ui::SelectFileDialog> select_file_dialog_; |
68 | 69 |
69 DISALLOW_COPY_AND_ASSIGN(ImportDataHandler); | 70 DISALLOW_COPY_AND_ASSIGN(ImportDataHandler); |
70 }; | 71 }; |
71 | 72 |
72 } // namespace options | 73 } // namespace options |
73 | 74 |
74 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_IMPORT_DATA_HANDLER_H_ | 75 #endif // CHROME_BROWSER_UI_WEBUI_OPTIONS_IMPORT_DATA_HANDLER_H_ |
OLD | NEW |