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_COMMON_IMPORTER_IMPORTER_BRIDGE_H_ | 5 #ifndef CHROME_COMMON_IMPORTER_IMPORTER_BRIDGE_H_ |
6 #define CHROME_COMMON_IMPORTER_IMPORTER_BRIDGE_H_ | 6 #define CHROME_COMMON_IMPORTER_IMPORTER_BRIDGE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
12 #include "base/memory/ref_counted.h" | 12 #include "base/memory/ref_counted.h" |
13 #include "base/strings/string16.h" | 13 #include "base/strings/string16.h" |
14 #include "build/build_config.h" | 14 #include "build/build_config.h" |
15 #include "chrome/common/importer/importer_data_types.h" | 15 #include "chrome/common/importer/importer_data_types.h" |
16 #include "chrome/common/importer/importer_url_row.h" | 16 #include "chrome/common/importer/importer_url_row.h" |
17 | 17 |
18 class GURL; | 18 class GURL; |
19 struct ImportedBookmarkEntry; | 19 struct ImportedBookmarkEntry; |
20 struct ImportedFaviconUsage; | 20 struct ImportedFaviconUsage; |
21 | 21 |
| 22 namespace autofill { |
| 23 struct PasswordForm; |
| 24 } |
| 25 |
22 namespace importer { | 26 namespace importer { |
23 #if defined(OS_WIN) | 27 #if defined(OS_WIN) |
24 struct ImporterIE7PasswordInfo; | 28 struct ImporterIE7PasswordInfo; |
25 #endif | 29 #endif |
26 struct ImporterURlRow; | 30 struct ImporterURlRow; |
27 struct URLKeywordInfo; | 31 struct URLKeywordInfo; |
28 } | 32 } |
29 | 33 |
30 namespace content { | |
31 struct PasswordForm; | |
32 } | |
33 | |
34 class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> { | 34 class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> { |
35 public: | 35 public: |
36 ImporterBridge(); | 36 ImporterBridge(); |
37 | 37 |
38 virtual void AddBookmarks( | 38 virtual void AddBookmarks( |
39 const std::vector<ImportedBookmarkEntry>& bookmarks, | 39 const std::vector<ImportedBookmarkEntry>& bookmarks, |
40 const string16& first_folder_name) = 0; | 40 const string16& first_folder_name) = 0; |
41 | 41 |
42 virtual void AddHomePage(const GURL& home_page) = 0; | 42 virtual void AddHomePage(const GURL& home_page) = 0; |
43 | 43 |
(...skipping 10 matching lines...) Expand all Loading... |
54 | 54 |
55 virtual void SetKeywords( | 55 virtual void SetKeywords( |
56 const std::vector<importer::URLKeywordInfo>& url_keywords, | 56 const std::vector<importer::URLKeywordInfo>& url_keywords, |
57 bool unique_on_host_and_path) = 0; | 57 bool unique_on_host_and_path) = 0; |
58 | 58 |
59 // The search_engine_data vector contains XML data retrieved from the Firefox | 59 // The search_engine_data vector contains XML data retrieved from the Firefox |
60 // profile and its sqlite db. | 60 // profile and its sqlite db. |
61 virtual void SetFirefoxSearchEnginesXMLData( | 61 virtual void SetFirefoxSearchEnginesXMLData( |
62 const std::vector<std::string>& search_engine_data) = 0; | 62 const std::vector<std::string>& search_engine_data) = 0; |
63 | 63 |
64 virtual void SetPasswordForm(const content::PasswordForm& form) = 0; | 64 virtual void SetPasswordForm(const autofill::PasswordForm& form) = 0; |
65 | 65 |
66 // Notifies the coordinator that the import operation has begun. | 66 // Notifies the coordinator that the import operation has begun. |
67 virtual void NotifyStarted() = 0; | 67 virtual void NotifyStarted() = 0; |
68 | 68 |
69 // Notifies the coordinator that the collection of data for the specified | 69 // Notifies the coordinator that the collection of data for the specified |
70 // item has begun. | 70 // item has begun. |
71 virtual void NotifyItemStarted(importer::ImportItem item) = 0; | 71 virtual void NotifyItemStarted(importer::ImportItem item) = 0; |
72 | 72 |
73 // Notifies the coordinator that the collection of data for the specified | 73 // Notifies the coordinator that the collection of data for the specified |
74 // item has completed. | 74 // item has completed. |
(...skipping 10 matching lines...) Expand all Loading... |
85 | 85 |
86 protected: | 86 protected: |
87 friend class base::RefCountedThreadSafe<ImporterBridge>; | 87 friend class base::RefCountedThreadSafe<ImporterBridge>; |
88 | 88 |
89 virtual ~ImporterBridge(); | 89 virtual ~ImporterBridge(); |
90 | 90 |
91 DISALLOW_COPY_AND_ASSIGN(ImporterBridge); | 91 DISALLOW_COPY_AND_ASSIGN(ImporterBridge); |
92 }; | 92 }; |
93 | 93 |
94 #endif // CHROME_COMMON_IMPORTER_IMPORTER_BRIDGE_H_ | 94 #endif // CHROME_COMMON_IMPORTER_IMPORTER_BRIDGE_H_ |
OLD | NEW |