| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <deque> | 9 #include <deque> |
| 10 #include <map> | 10 #include <map> |
| (...skipping 1239 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1250 NavigationController* controller_; | 1250 NavigationController* controller_; |
| 1251 base::WeakPtr<AutomationProvider> automation_; | 1251 base::WeakPtr<AutomationProvider> automation_; |
| 1252 scoped_ptr<IPC::Message> reply_message_; | 1252 scoped_ptr<IPC::Message> reply_message_; |
| 1253 NotificationRegistrar registrar_; | 1253 NotificationRegistrar registrar_; |
| 1254 extension_misc::LaunchContainer launch_container_; | 1254 extension_misc::LaunchContainer launch_container_; |
| 1255 int new_window_id_; | 1255 int new_window_id_; |
| 1256 | 1256 |
| 1257 DISALLOW_COPY_AND_ASSIGN(AppLaunchObserver); | 1257 DISALLOW_COPY_AND_ASSIGN(AppLaunchObserver); |
| 1258 }; | 1258 }; |
| 1259 | 1259 |
| 1260 // Allows automation provider to wait until the autocomplete edit | |
| 1261 // has received focus. | |
| 1262 class AutocompleteEditFocusedObserver : public NotificationObserver { | |
| 1263 public: | |
| 1264 AutocompleteEditFocusedObserver(AutomationProvider* automation, | |
| 1265 AutocompleteEditModel* autocomplete_edit, | |
| 1266 IPC::Message* reply_message); | |
| 1267 virtual ~AutocompleteEditFocusedObserver(); | |
| 1268 | |
| 1269 virtual void Observe(NotificationType type, | |
| 1270 const NotificationSource& source, | |
| 1271 const NotificationDetails& details); | |
| 1272 | |
| 1273 private: | |
| 1274 NotificationRegistrar registrar_; | |
| 1275 base::WeakPtr<AutomationProvider> automation_; | |
| 1276 scoped_ptr<IPC::Message> reply_message_; | |
| 1277 AutocompleteEditModel* autocomplete_edit_model_; | |
| 1278 | |
| 1279 DISALLOW_COPY_AND_ASSIGN(AutocompleteEditFocusedObserver); | |
| 1280 }; | |
| 1281 | |
| 1282 // Observes when Autofill information is displayed in the renderer. This can | 1260 // Observes when Autofill information is displayed in the renderer. This can |
| 1283 // happen in two different ways: (1) a popup containing Autofill suggestions | 1261 // happen in two different ways: (1) a popup containing Autofill suggestions |
| 1284 // has been shown in the renderer; (2) a webpage form is filled or previewed | 1262 // has been shown in the renderer; (2) a webpage form is filled or previewed |
| 1285 // with Autofill suggestions. A constructor argument specifies the appropriate | 1263 // with Autofill suggestions. A constructor argument specifies the appropriate |
| 1286 // notification to wait for. | 1264 // notification to wait for. |
| 1287 class AutofillDisplayedObserver : public NotificationObserver { | 1265 class AutofillDisplayedObserver : public NotificationObserver { |
| 1288 public: | 1266 public: |
| 1289 AutofillDisplayedObserver(NotificationType notification, | 1267 AutofillDisplayedObserver(NotificationType notification, |
| 1290 RenderViewHost* render_view_host, | 1268 RenderViewHost* render_view_host, |
| 1291 AutomationProvider* automation, | 1269 AutomationProvider* automation, |
| (...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 // Sends the |reply_message_| to |automation_| indicating we're done. | 1505 // Sends the |reply_message_| to |automation_| indicating we're done. |
| 1528 void RunOnUIThread(); | 1506 void RunOnUIThread(); |
| 1529 | 1507 |
| 1530 base::WeakPtr<AutomationProvider> automation_; | 1508 base::WeakPtr<AutomationProvider> automation_; |
| 1531 scoped_ptr<IPC::Message> reply_message_; | 1509 scoped_ptr<IPC::Message> reply_message_; |
| 1532 | 1510 |
| 1533 DISALLOW_COPY_AND_ASSIGN(WaitForProcessLauncherThreadToGoIdleObserver); | 1511 DISALLOW_COPY_AND_ASSIGN(WaitForProcessLauncherThreadToGoIdleObserver); |
| 1534 }; | 1512 }; |
| 1535 | 1513 |
| 1536 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 1514 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
| OLD | NEW |