| 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/download/download_manager.h" | 14 #include "chrome/browser/download/download_manager.h" |
| 14 #include "chrome/common/notification_observer.h" | 15 #include "chrome/common/notification_observer.h" |
| 15 #include "chrome/common/notification_registrar.h" | 16 #include "chrome/common/notification_registrar.h" |
| 16 #include "chrome/common/notification_type.h" | 17 #include "chrome/common/notification_type.h" |
| 17 #include "chrome/test/automation/automation_messages.h" | 18 #include "chrome/test/automation/automation_messages.h" |
| 18 | 19 |
| 19 class AutomationProvider; | 20 class AutomationProvider; |
| 20 class Browser; | 21 class Browser; |
| 21 class Extension; | 22 class Extension; |
| 22 class ExtensionProcessManager; | 23 class ExtensionProcessManager; |
| (...skipping 581 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 } | 605 } |
| 605 ~AutomationProviderHistoryObserver() {} | 606 ~AutomationProviderHistoryObserver() {} |
| 606 void HistoryQueryComplete(HistoryService::Handle request_handle, | 607 void HistoryQueryComplete(HistoryService::Handle request_handle, |
| 607 history::QueryResults* results); | 608 history::QueryResults* results); |
| 608 | 609 |
| 609 private: | 610 private: |
| 610 AutomationProvider* provider_; | 611 AutomationProvider* provider_; |
| 611 IPC::Message* reply_message_; | 612 IPC::Message* reply_message_; |
| 612 }; | 613 }; |
| 613 | 614 |
| 615 // Allows the automation provider to wait for clearing browser data to finish. |
| 616 class AutomationProviderBrowsingDataObserver : |
| 617 public BrowsingDataRemover::Observer { |
| 618 public: |
| 619 AutomationProviderBrowsingDataObserver( |
| 620 AutomationProvider* provider, |
| 621 IPC::Message* reply_message) |
| 622 : provider_(provider), |
| 623 reply_message_(reply_message) {} |
| 624 void OnBrowsingDataRemoverDone(); |
| 625 |
| 626 private: |
| 627 AutomationProvider* provider_; |
| 628 IPC::Message* reply_message_; |
| 629 }; |
| 630 |
| 614 // Allows automation provider to wait until page load after selecting an item | 631 // Allows automation provider to wait until page load after selecting an item |
| 615 // in the omnibox popup. | 632 // in the omnibox popup. |
| 616 class OmniboxAcceptNotificationObserver : public NotificationObserver { | 633 class OmniboxAcceptNotificationObserver : public NotificationObserver { |
| 617 public: | 634 public: |
| 618 OmniboxAcceptNotificationObserver(NavigationController* controller, | 635 OmniboxAcceptNotificationObserver(NavigationController* controller, |
| 619 AutomationProvider* automation, | 636 AutomationProvider* automation, |
| 620 IPC::Message* reply_message); | 637 IPC::Message* reply_message); |
| 621 ~OmniboxAcceptNotificationObserver(); | 638 ~OmniboxAcceptNotificationObserver(); |
| 622 | 639 |
| 623 virtual void Observe(NotificationType type, | 640 virtual void Observe(NotificationType type, |
| (...skipping 23 matching lines...) Expand all Loading... |
| 647 | 664 |
| 648 private: | 665 private: |
| 649 NotificationRegistrar registrar_; | 666 NotificationRegistrar registrar_; |
| 650 AutomationProvider* automation_; | 667 AutomationProvider* automation_; |
| 651 IPC::Message* reply_message_; | 668 IPC::Message* reply_message_; |
| 652 | 669 |
| 653 DISALLOW_COPY_AND_ASSIGN(SavePackageNotificationObserver); | 670 DISALLOW_COPY_AND_ASSIGN(SavePackageNotificationObserver); |
| 654 }; | 671 }; |
| 655 | 672 |
| 656 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 673 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
| OLD | NEW |