| OLD | NEW |
| 1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2006-2008 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_H_ | 5 #ifndef CHROME_BROWSER_IMPORTER_IMPORTER_H_ |
| 6 #define CHROME_BROWSER_IMPORTER_IMPORTER_H_ | 6 #define CHROME_BROWSER_IMPORTER_IMPORTER_H_ |
| 7 | 7 |
| 8 #include <string> | 8 #include <string> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 175 virtual void BookmarkNodeRemoved(BookmarkModel* model, | 175 virtual void BookmarkNodeRemoved(BookmarkModel* model, |
| 176 const BookmarkNode* parent, | 176 const BookmarkNode* parent, |
| 177 int old_index, | 177 int old_index, |
| 178 const BookmarkNode* node) {} | 178 const BookmarkNode* node) {} |
| 179 virtual void BookmarkNodeChanged(BookmarkModel* model, | 179 virtual void BookmarkNodeChanged(BookmarkModel* model, |
| 180 const BookmarkNode* node) {} | 180 const BookmarkNode* node) {} |
| 181 virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, | 181 virtual void BookmarkNodeChildrenReordered(BookmarkModel* model, |
| 182 const BookmarkNode* node) {} | 182 const BookmarkNode* node) {} |
| 183 virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model, | 183 virtual void BookmarkNodeFavIconLoaded(BookmarkModel* model, |
| 184 const BookmarkNode* node) {} | 184 const BookmarkNode* node) {} |
| 185 virtual void BookmarkModelBeingDeleted(BookmarkModel* model); |
| 185 | 186 |
| 186 // NotificationObserver method. Called when TemplateURLModel has been loaded. | 187 // NotificationObserver method. Called when TemplateURLModel has been loaded. |
| 187 void Observe(NotificationType type, | 188 void Observe(NotificationType type, |
| 188 const NotificationSource& source, | 189 const NotificationSource& source, |
| 189 const NotificationDetails& details); | 190 const NotificationDetails& details); |
| 190 | 191 |
| 191 // ShowWarningDialog() asks user to close the application that is owning the | 192 // ShowWarningDialog() asks user to close the application that is owning the |
| 192 // lock. They can retry or skip the importing process. | 193 // lock. They can retry or skip the importing process. |
| 193 void ShowWarningDialog(); | 194 void ShowWarningDialog(); |
| 194 | 195 |
| (...skipping 78 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 } | 274 } |
| 274 | 275 |
| 275 | 276 |
| 276 private: | 277 private: |
| 277 // If we're not waiting on any model to finish loading, invokes the task_. | 278 // If we're not waiting on any model to finish loading, invokes the task_. |
| 278 void InvokeTaskIfDone(); | 279 void InvokeTaskIfDone(); |
| 279 | 280 |
| 280 NotificationRegistrar registrar_; | 281 NotificationRegistrar registrar_; |
| 281 ImporterList importer_list_; | 282 ImporterList importer_list_; |
| 282 | 283 |
| 284 // Profile we're importing from. |
| 285 Profile* profile_; |
| 286 |
| 283 Observer* observer_; | 287 Observer* observer_; |
| 284 scoped_refptr<ProfileWriter> writer_; | 288 scoped_refptr<ProfileWriter> writer_; |
| 285 | 289 |
| 286 // The task is the process of importing settings from other browsers. | 290 // The task is the process of importing settings from other browsers. |
| 287 Task* task_; | 291 Task* task_; |
| 288 | 292 |
| 289 // The importer used in the task; | 293 // The importer used in the task; |
| 290 Importer* importer_; | 294 Importer* importer_; |
| 291 | 295 |
| 292 // The message loop for reading the source profiles. | 296 // The message loop for reading the source profiles. |
| 293 MessageLoop* file_loop_; | 297 MessageLoop* file_loop_; |
| 294 | 298 |
| 295 // True if we're waiting for the model to finish loading. | 299 // True if we're waiting for the model to finish loading. |
| 296 bool waiting_for_bookmarkbar_model_; | 300 bool waiting_for_bookmarkbar_model_; |
| 297 | 301 |
| 302 // Have we installed a listener on the bookmark model? |
| 303 bool installed_bookmark_observer_; |
| 304 |
| 298 // True if source profile is readable. | 305 // True if source profile is readable. |
| 299 bool is_source_readable_; | 306 bool is_source_readable_; |
| 300 | 307 |
| 301 // True if UI is not to be shown. | 308 // True if UI is not to be shown. |
| 302 bool headless_; | 309 bool headless_; |
| 303 | 310 |
| 304 // Parent Window to use when showing any modal dialog boxes. | 311 // Parent Window to use when showing any modal dialog boxes. |
| 305 gfx::NativeWindow parent_window_; | 312 gfx::NativeWindow parent_window_; |
| 306 | 313 |
| 307 // Firefox profile lock. | 314 // Firefox profile lock. |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 376 // first run UI. | 383 // first run UI. |
| 377 void StartImportingWithUI(gfx::NativeWindow parent_window, | 384 void StartImportingWithUI(gfx::NativeWindow parent_window, |
| 378 int16 items, | 385 int16 items, |
| 379 ImporterHost* coordinator, | 386 ImporterHost* coordinator, |
| 380 const ProfileInfo& source_profile, | 387 const ProfileInfo& source_profile, |
| 381 Profile* target_profile, | 388 Profile* target_profile, |
| 382 ImportObserver* observer, | 389 ImportObserver* observer, |
| 383 bool first_run); | 390 bool first_run); |
| 384 | 391 |
| 385 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_H_ | 392 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_H_ |
| OLD | NEW |