| 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 <set> | 8 #include <set> |
| 9 #include <vector> | 9 #include <vector> |
| 10 | 10 |
| (...skipping 205 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 216 // When in headless mode, the importer will not show the warning dialog and | 216 // When in headless mode, the importer will not show the warning dialog and |
| 217 // the outcome is as if the user had canceled the import operation. | 217 // the outcome is as if the user had canceled the import operation. |
| 218 void set_headless() { | 218 void set_headless() { |
| 219 headless_ = true; | 219 headless_ = true; |
| 220 } | 220 } |
| 221 | 221 |
| 222 bool is_headless() const { | 222 bool is_headless() const { |
| 223 return headless_; | 223 return headless_; |
| 224 } | 224 } |
| 225 | 225 |
| 226 void set_parent_window(gfx::NativeWindow parent_window) { |
| 227 parent_window_ = parent_window; |
| 228 } |
| 229 |
| 226 // An interface which an object can implement to be notified of events during | 230 // An interface which an object can implement to be notified of events during |
| 227 // the import process. | 231 // the import process. |
| 228 class Observer { | 232 class Observer { |
| 229 public: | 233 public: |
| 230 virtual ~Observer() {} | 234 virtual ~Observer() {} |
| 231 // Invoked when data for the specified item is about to be collected. | 235 // Invoked when data for the specified item is about to be collected. |
| 232 virtual void ImportItemStarted(ImportItem item) = 0; | 236 virtual void ImportItemStarted(ImportItem item) = 0; |
| 233 | 237 |
| 234 // Invoked when data for the specified item has been collected from the | 238 // Invoked when data for the specified item has been collected from the |
| 235 // source profile and is now ready for further processing. | 239 // source profile and is now ready for further processing. |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 303 | 307 |
| 304 // True if we're waiting for the model to finish loading. | 308 // True if we're waiting for the model to finish loading. |
| 305 bool waiting_for_bookmarkbar_model_; | 309 bool waiting_for_bookmarkbar_model_; |
| 306 | 310 |
| 307 // True if source profile is readable. | 311 // True if source profile is readable. |
| 308 bool is_source_readable_; | 312 bool is_source_readable_; |
| 309 | 313 |
| 310 // True if UI is not to be shown. | 314 // True if UI is not to be shown. |
| 311 bool headless_; | 315 bool headless_; |
| 312 | 316 |
| 317 // Parent Window to use when showing any modal dialog boxes. |
| 318 gfx::NativeWindow parent_window_; |
| 319 |
| 313 // Firefox profile lock. | 320 // Firefox profile lock. |
| 314 scoped_ptr<FirefoxProfileLock> firefox_lock_; | 321 scoped_ptr<FirefoxProfileLock> firefox_lock_; |
| 315 | 322 |
| 316 DISALLOW_EVIL_CONSTRUCTORS(ImporterHost); | 323 DISALLOW_EVIL_CONSTRUCTORS(ImporterHost); |
| 317 }; | 324 }; |
| 318 | 325 |
| 319 // The base class of all importers. | 326 // The base class of all importers. |
| 320 class Importer : public base::RefCounted<Importer> { | 327 class Importer : public base::RefCounted<Importer> { |
| 321 public: | 328 public: |
| 322 virtual ~Importer() { } | 329 virtual ~Importer() { } |
| (...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 427 void StartImportingWithUI(gfx::NativeWindow parent_window, | 434 void StartImportingWithUI(gfx::NativeWindow parent_window, |
| 428 int16 items, | 435 int16 items, |
| 429 ImporterHost* coordinator, | 436 ImporterHost* coordinator, |
| 430 const ProfileInfo& source_profile, | 437 const ProfileInfo& source_profile, |
| 431 Profile* target_profile, | 438 Profile* target_profile, |
| 432 ImportObserver* observer, | 439 ImportObserver* observer, |
| 433 bool first_run); | 440 bool first_run); |
| 434 #endif | 441 #endif |
| 435 | 442 |
| 436 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_H_ | 443 #endif // CHROME_BROWSER_IMPORTER_IMPORTER_H_ |
| OLD | NEW |