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_IMPORTER_IMPORTER_BRIDGE_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ |
6 #define CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ | 6 #define CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
11 #include "base/memory/ref_counted.h" | 11 #include "base/memory/ref_counted.h" |
12 #include "base/strings/string16.h" | 12 #include "base/strings/string16.h" |
13 #include "build/build_config.h" | 13 #include "build/build_config.h" |
14 #include "chrome/browser/history/history_types.h" | 14 #include "chrome/browser/history/history_types.h" |
15 #include "chrome/browser/importer/importer_data_types.h" | 15 #include "chrome/browser/importer/importer_data_types.h" |
16 | 16 |
17 class GURL; | 17 class GURL; |
18 struct IE7PasswordInfo; | 18 struct IE7PasswordInfo; |
19 struct ImportedBookmarkEntry; | 19 struct ImportedBookmarkEntry; |
20 struct ImportedFaviconUsage; | 20 struct ImportedFaviconUsage; |
21 class TemplateURL; | 21 class TemplateURL; |
22 // TODO: remove this, see friend declaration in ImporterBridge. | |
23 class Toolbar5Importer; | |
24 | 22 |
25 namespace content { | 23 namespace content { |
26 struct PasswordForm; | 24 struct PasswordForm; |
27 } | 25 } |
28 | 26 |
29 class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> { | 27 class ImporterBridge : public base::RefCountedThreadSafe<ImporterBridge> { |
30 public: | 28 public: |
31 ImporterBridge(); | 29 ImporterBridge(); |
32 | 30 |
33 virtual void AddBookmarks( | 31 virtual void AddBookmarks( |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
68 virtual void NotifyEnded() = 0; | 66 virtual void NotifyEnded() = 0; |
69 | 67 |
70 // For InProcessImporters this calls l10n_util. For ExternalProcessImporters | 68 // For InProcessImporters this calls l10n_util. For ExternalProcessImporters |
71 // this calls the set of strings we've ported over to the external process. | 69 // this calls the set of strings we've ported over to the external process. |
72 // It's good to avoid having to create a separate ResourceBundle for the | 70 // It's good to avoid having to create a separate ResourceBundle for the |
73 // external import process, since the importer only needs a few strings. | 71 // external import process, since the importer only needs a few strings. |
74 virtual string16 GetLocalizedString(int message_id) = 0; | 72 virtual string16 GetLocalizedString(int message_id) = 0; |
75 | 73 |
76 protected: | 74 protected: |
77 friend class base::RefCountedThreadSafe<ImporterBridge>; | 75 friend class base::RefCountedThreadSafe<ImporterBridge>; |
78 // TODO: In order to run Toolbar5Importer OOP we need to cut this | |
79 // connection, but as an interim step we allow Toolbar5Import to break | |
80 // the abstraction here and assume import is in-process. | |
81 friend class Toolbar5Importer; | |
82 | 76 |
83 virtual ~ImporterBridge(); | 77 virtual ~ImporterBridge(); |
84 | 78 |
85 DISALLOW_COPY_AND_ASSIGN(ImporterBridge); | 79 DISALLOW_COPY_AND_ASSIGN(ImporterBridge); |
86 }; | 80 }; |
87 | 81 |
88 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ | 82 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_BRIDGE_H_ |
OLD | NEW |