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/download/download_manager.h" | 13 #include "chrome/browser/download/download_manager.h" |
14 #include "chrome/common/notification_observer.h" | 14 #include "chrome/common/notification_observer.h" |
15 #include "chrome/common/notification_registrar.h" | 15 #include "chrome/common/notification_registrar.h" |
16 #include "chrome/common/notification_type.h" | 16 #include "chrome/common/notification_type.h" |
17 #include "chrome/test/automation/automation_messages.h" | 17 #include "chrome/test/automation/automation_messages.h" |
18 | 18 |
19 class AutomationProvider; | 19 class AutomationProvider; |
20 class Browser; | 20 class Browser; |
21 class Extension; | 21 class Extension; |
22 class ExtensionProcessManager; | 22 class ExtensionProcessManager; |
23 class NavigationController; | 23 class NavigationController; |
| 24 class SavePackage; |
24 class TabContents; | 25 class TabContents; |
25 | 26 |
26 namespace IPC { | 27 namespace IPC { |
27 class Message; | 28 class Message; |
28 } | 29 } |
29 | 30 |
30 class InitialLoadObserver : public NotificationObserver { | 31 class InitialLoadObserver : public NotificationObserver { |
31 public: | 32 public: |
32 InitialLoadObserver(size_t tab_count, AutomationProvider* automation); | 33 InitialLoadObserver(size_t tab_count, AutomationProvider* automation); |
33 ~InitialLoadObserver(); | 34 ~InitialLoadObserver(); |
(...skipping 591 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 | 626 |
626 private: | 627 private: |
627 NotificationRegistrar registrar_; | 628 NotificationRegistrar registrar_; |
628 AutomationProvider* automation_; | 629 AutomationProvider* automation_; |
629 IPC::Message* reply_message_; | 630 IPC::Message* reply_message_; |
630 NavigationController* controller_; | 631 NavigationController* controller_; |
631 | 632 |
632 DISALLOW_COPY_AND_ASSIGN(OmniboxAcceptNotificationObserver); | 633 DISALLOW_COPY_AND_ASSIGN(OmniboxAcceptNotificationObserver); |
633 }; | 634 }; |
634 | 635 |
| 636 // Allows the automation provider to wait for a save package notification. |
| 637 class SavePackageNotificationObserver : public NotificationObserver { |
| 638 public: |
| 639 SavePackageNotificationObserver(SavePackage* save_package, |
| 640 AutomationProvider* automation, |
| 641 IPC::Message* reply_message); |
| 642 virtual ~SavePackageNotificationObserver() {} |
| 643 |
| 644 virtual void Observe(NotificationType type, |
| 645 const NotificationSource& source, |
| 646 const NotificationDetails& details); |
| 647 |
| 648 private: |
| 649 NotificationRegistrar registrar_; |
| 650 AutomationProvider* automation_; |
| 651 IPC::Message* reply_message_; |
| 652 |
| 653 DISALLOW_COPY_AND_ASSIGN(SavePackageNotificationObserver); |
| 654 }; |
| 655 |
635 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 656 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
OLD | NEW |