Index: chrome/common/importer/profile_import.mojom |
diff --git a/chrome/common/importer/profile_import.mojom b/chrome/common/importer/profile_import.mojom |
new file mode 100644 |
index 0000000000000000000000000000000000000000..d2dbbb51eab9368d02e794f74eacde3143f1c720 |
--- /dev/null |
+++ b/chrome/common/importer/profile_import.mojom |
@@ -0,0 +1,77 @@ |
+// Copyright 2016 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. |
+ |
+module chrome.mojom; |
+ |
+import "components/autofill/content/common/autofill_types.mojom"; |
+import "mojo/common/common_custom_types.mojom"; |
+import "url/mojo/url.mojom"; |
+ |
+[Native] |
+struct ImportedBookmarkEntry; |
+ |
+[Native] |
+struct ImporterAutofillFormDataEntry; |
+ |
+[Native] |
+struct SearchEngineInfo; |
+ |
+[Native] |
+struct ImporterURLRow; |
+ |
+[Native] |
+struct SourceProfile; |
+ |
+[Native] |
+struct FaviconUsageDataList; |
+ |
+[Native] |
+struct ImporterIE7PasswordInfo; |
+ |
+[Native] |
+enum ImportItem; |
+ |
+interface ProfileImportObserver { |
+ OnImportStart(); |
+ OnImportFinished(bool succeeded, string error_msg); |
+ OnImportItemStart(ImportItem item); |
+ OnImportItemFinished(ImportItem item); |
+ OnHistoryImportStart(int32 total_history_rows_count); |
+ OnHistoryImportGroup( |
+ array<ImporterURLRow> history_rows_group, |
+ int32 visit_source); |
+ OnHomePageImportReady(url.mojom.Url home_page); |
+ OnBookmarksImportStart( |
+ mojo.common.mojom.String16 first_folder_name, |
+ int32 total_bookmarks_count); |
+ OnBookmarksImportGroup(array<ImportedBookmarkEntry> bookmarks_group); |
+ OnFaviconsImportStart(int32 total_favicons_count); |
+ OnFaviconsImportGroup(FaviconUsageDataList favicons_group); |
+ OnPasswordFormImportReady(autofill.mojom.PasswordForm form); |
+ OnKeywordsImportReady( |
+ array<SearchEngineInfo> search_engines, |
+ bool unique_on_host_and_path); |
+ OnFirefoxSearchEngineDataReceived(array<string> search_engine_data); |
+ OnAutofillFormDataImportStart(int32 total_autofill_form_data_entry_count); |
+ OnAutofillFormDataImportGroup( |
+ array<ImporterAutofillFormDataEntry> autofill_form_data_entry_group); |
+ // Windows only: |
+ OnIE7PasswordReceived(ImporterIE7PasswordInfo importer_password_info); |
+}; |
+ |
+interface ProfileImport { |
+ // Start the importer. |items| is a bitmask of importer::ImportItem of items |
+ // to import. |
+ StartImport( |
+ SourceProfile source_profile, |
+ uint16 items, |
+ mojo.common.mojom.DictionaryValue localized_strings, |
+ ProfileImportObserver observer); |
+ |
+ // Stop the importer. |
+ CancelImport(); |
+ |
+ // Tell the importer that we're done with one item. |
+ ReportImportItemFinished(ImportItem item); |
+}; |