| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2009 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_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
| 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 6 #define CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
| 7 | 7 |
| 8 #include <deque> | 8 #include <deque> |
| 9 #include <map> | 9 #include <map> |
| 10 #include <set> | 10 #include <set> |
| 11 | 11 |
| 12 #include "chrome/browser/bookmarks/bookmark_model_observer.h" | 12 #include "chrome/browser/bookmarks/bookmark_model_observer.h" |
| 13 #include "chrome/browser/browsing_data_remover.h" | 13 #include "chrome/browser/browsing_data_remover.h" |
| 14 #include "chrome/browser/download/download_manager.h" | 14 #include "chrome/browser/download/download_manager.h" |
| 15 #include "chrome/browser/importer/importer.h" |
| 16 #include "chrome/browser/importer/importer_data_types.h" |
| 15 #include "chrome/common/notification_observer.h" | 17 #include "chrome/common/notification_observer.h" |
| 16 #include "chrome/common/notification_registrar.h" | 18 #include "chrome/common/notification_registrar.h" |
| 17 #include "chrome/common/notification_type.h" | 19 #include "chrome/common/notification_type.h" |
| 18 #include "chrome/test/automation/automation_messages.h" | 20 #include "chrome/test/automation/automation_messages.h" |
| 19 | 21 |
| 20 class AutomationProvider; | 22 class AutomationProvider; |
| 21 class Browser; | 23 class Browser; |
| 22 class Extension; | 24 class Extension; |
| 23 class ExtensionProcessManager; | 25 class ExtensionProcessManager; |
| 24 class NavigationController; | 26 class NavigationController; |
| (...skipping 580 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 605 } | 607 } |
| 606 ~AutomationProviderHistoryObserver() {} | 608 ~AutomationProviderHistoryObserver() {} |
| 607 void HistoryQueryComplete(HistoryService::Handle request_handle, | 609 void HistoryQueryComplete(HistoryService::Handle request_handle, |
| 608 history::QueryResults* results); | 610 history::QueryResults* results); |
| 609 | 611 |
| 610 private: | 612 private: |
| 611 AutomationProvider* provider_; | 613 AutomationProvider* provider_; |
| 612 IPC::Message* reply_message_; | 614 IPC::Message* reply_message_; |
| 613 }; | 615 }; |
| 614 | 616 |
| 617 // Allows the automation provider to wait for import queries to finish. |
| 618 class AutomationProviderImportSettingsObserver : |
| 619 public ImporterHost::Observer { |
| 620 public: |
| 621 AutomationProviderImportSettingsObserver( |
| 622 AutomationProvider* provider, |
| 623 IPC::Message* reply_message) |
| 624 : provider_(provider), |
| 625 reply_message_(reply_message) {} |
| 626 void ImportStarted() {} |
| 627 void ImportItemStarted(importer::ImportItem item) {} |
| 628 void ImportItemEnded(importer::ImportItem item) {} |
| 629 void ImportEnded(); |
| 630 private: |
| 631 AutomationProvider* provider_; |
| 632 IPC::Message* reply_message_; |
| 633 }; |
| 634 |
| 615 // Allows the automation provider to wait for clearing browser data to finish. | 635 // Allows the automation provider to wait for clearing browser data to finish. |
| 616 class AutomationProviderBrowsingDataObserver : | 636 class AutomationProviderBrowsingDataObserver : |
| 617 public BrowsingDataRemover::Observer { | 637 public BrowsingDataRemover::Observer { |
| 618 public: | 638 public: |
| 619 AutomationProviderBrowsingDataObserver( | 639 AutomationProviderBrowsingDataObserver( |
| 620 AutomationProvider* provider, | 640 AutomationProvider* provider, |
| 621 IPC::Message* reply_message) | 641 IPC::Message* reply_message) |
| 622 : provider_(provider), | 642 : provider_(provider), |
| 623 reply_message_(reply_message) {} | 643 reply_message_(reply_message) {} |
| 624 void OnBrowsingDataRemoverDone(); | 644 void OnBrowsingDataRemoverDone(); |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 664 | 684 |
| 665 private: | 685 private: |
| 666 NotificationRegistrar registrar_; | 686 NotificationRegistrar registrar_; |
| 667 AutomationProvider* automation_; | 687 AutomationProvider* automation_; |
| 668 IPC::Message* reply_message_; | 688 IPC::Message* reply_message_; |
| 669 | 689 |
| 670 DISALLOW_COPY_AND_ASSIGN(SavePackageNotificationObserver); | 690 DISALLOW_COPY_AND_ASSIGN(SavePackageNotificationObserver); |
| 671 }; | 691 }; |
| 672 | 692 |
| 673 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 693 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
| OLD | NEW |