OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 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 module chrome.mojom; |
| 6 |
| 7 import "components/autofill/content/common/autofill_types.mojom"; |
| 8 import "mojo/common/common_custom_types.mojom"; |
| 9 import "url/mojo/url.mojom"; |
| 10 |
| 11 [Native] |
| 12 struct ImportedBookmarkEntry; |
| 13 |
| 14 [Native] |
| 15 struct ImporterAutofillFormDataEntry; |
| 16 |
| 17 [Native] |
| 18 struct SearchEngineInfo; |
| 19 |
| 20 [Native] |
| 21 struct ImporterURLRow; |
| 22 |
| 23 [Native] |
| 24 struct SourceProfile; |
| 25 |
| 26 [Native] |
| 27 struct FaviconUsageDataList; |
| 28 |
| 29 [Native] |
| 30 struct ImporterIE7PasswordInfo; |
| 31 |
| 32 [Native] |
| 33 enum ImportItem; |
| 34 |
| 35 // These are messages sent from the profile import process to the browser. |
| 36 // These messages send information about the status of the import and individual |
| 37 // import tasks. |
| 38 interface ProfileImportObserver { |
| 39 OnImportStart(); |
| 40 OnImportFinished(bool succeeded, string error_msg); |
| 41 OnImportItemStart(ImportItem item); |
| 42 OnImportItemFinished(ImportItem item); |
| 43 |
| 44 // These messages send data from the external importer process back to the |
| 45 // process host so it can be written to the profile. |
| 46 OnHistoryImportStart(uint32 total_history_rows_count); |
| 47 OnHistoryImportGroup( |
| 48 array<ImporterURLRow> history_rows_group, |
| 49 int32 visit_source); |
| 50 OnHomePageImportReady(url.mojom.Url home_page); |
| 51 OnBookmarksImportStart( |
| 52 mojo.common.mojom.String16 first_folder_name, |
| 53 uint32 total_bookmarks_count); |
| 54 OnBookmarksImportGroup(array<ImportedBookmarkEntry> bookmarks_group); |
| 55 OnFaviconsImportStart(uint32 total_favicons_count); |
| 56 OnFaviconsImportGroup(FaviconUsageDataList favicons_group); |
| 57 OnPasswordFormImportReady(autofill.mojom.PasswordForm form); |
| 58 OnKeywordsImportReady( |
| 59 array<SearchEngineInfo> search_engines, |
| 60 bool unique_on_host_and_path); |
| 61 OnFirefoxSearchEngineDataReceived(array<string> search_engine_data); |
| 62 OnAutofillFormDataImportStart(uint32 total_autofill_form_data_entry_count); |
| 63 OnAutofillFormDataImportGroup( |
| 64 array<ImporterAutofillFormDataEntry> autofill_form_data_entry_group); |
| 65 // Windows only: |
| 66 OnIE7PasswordReceived(ImporterIE7PasswordInfo importer_password_info); |
| 67 }; |
| 68 |
| 69 // This interface is used to control the import process. |
| 70 interface ProfileImport { |
| 71 // Start the importer. |items| is a bitmask of importer::ImportItem of items |
| 72 // to import. |
| 73 StartImport( |
| 74 SourceProfile source_profile, |
| 75 uint16 items, |
| 76 mojo.common.mojom.DictionaryValue localized_strings, |
| 77 ProfileImportObserver observer); |
| 78 |
| 79 // Stop the importer. |
| 80 CancelImport(); |
| 81 |
| 82 // Tell the importer that we're done with one item. |
| 83 ReportImportItemFinished(ImportItem item); |
| 84 }; |
OLD | NEW |