OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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> |
(...skipping 1078 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1089 }; | 1089 }; |
1090 | 1090 |
1091 // Allows the automation provider to wait until the download has been updated | 1091 // Allows the automation provider to wait until the download has been updated |
1092 // or opened. | 1092 // or opened. |
1093 class AutomationProviderDownloadUpdatedObserver | 1093 class AutomationProviderDownloadUpdatedObserver |
1094 : public content::DownloadItem::Observer { | 1094 : public content::DownloadItem::Observer { |
1095 public: | 1095 public: |
1096 AutomationProviderDownloadUpdatedObserver( | 1096 AutomationProviderDownloadUpdatedObserver( |
1097 AutomationProvider* provider, | 1097 AutomationProvider* provider, |
1098 IPC::Message* reply_message, | 1098 IPC::Message* reply_message, |
1099 bool wait_for_open); | 1099 bool wait_for_open, |
| 1100 bool incognito); |
1100 virtual ~AutomationProviderDownloadUpdatedObserver(); | 1101 virtual ~AutomationProviderDownloadUpdatedObserver(); |
1101 | 1102 |
1102 virtual void OnDownloadUpdated(content::DownloadItem* download); | 1103 virtual void OnDownloadUpdated(content::DownloadItem* download); |
1103 virtual void OnDownloadOpened(content::DownloadItem* download); | 1104 virtual void OnDownloadOpened(content::DownloadItem* download); |
1104 | 1105 |
1105 private: | 1106 private: |
1106 base::WeakPtr<AutomationProvider> provider_; | 1107 base::WeakPtr<AutomationProvider> provider_; |
1107 scoped_ptr<IPC::Message> reply_message_; | 1108 scoped_ptr<IPC::Message> reply_message_; |
1108 bool wait_for_open_; | 1109 bool wait_for_open_; |
| 1110 bool incognito_; |
1109 | 1111 |
1110 DISALLOW_COPY_AND_ASSIGN(AutomationProviderDownloadUpdatedObserver); | 1112 DISALLOW_COPY_AND_ASSIGN(AutomationProviderDownloadUpdatedObserver); |
1111 }; | 1113 }; |
1112 | 1114 |
1113 // Allows the automation provider to wait until the download model has changed | 1115 // Allows the automation provider to wait until the download model has changed |
1114 // (because a new download has been added or removed). | 1116 // (because a new download has been added or removed). |
1115 class AutomationProviderDownloadModelChangedObserver | 1117 class AutomationProviderDownloadModelChangedObserver |
1116 : public content::DownloadManager::Observer { | 1118 : public content::DownloadManager::Observer { |
1117 public: | 1119 public: |
1118 AutomationProviderDownloadModelChangedObserver( | 1120 AutomationProviderDownloadModelChangedObserver( |
(...skipping 872 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1991 base::WeakPtr<AutomationProvider> automation_; | 1993 base::WeakPtr<AutomationProvider> automation_; |
1992 scoped_ptr<IPC::Message> reply_message_; | 1994 scoped_ptr<IPC::Message> reply_message_; |
1993 int new_window_id_; | 1995 int new_window_id_; |
1994 int num_loads_; | 1996 int num_loads_; |
1995 | 1997 |
1996 DISALLOW_COPY_AND_ASSIGN( | 1998 DISALLOW_COPY_AND_ASSIGN( |
1997 BrowserOpenedWithExistingProfileNotificationObserver); | 1999 BrowserOpenedWithExistingProfileNotificationObserver); |
1998 }; | 2000 }; |
1999 | 2001 |
2000 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 2002 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
OLD | NEW |