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> |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "chrome/common/notification_type.h" | 22 #include "chrome/common/notification_type.h" |
23 #include "chrome/test/automation/automation_messages.h" | 23 #include "chrome/test/automation/automation_messages.h" |
24 | 24 |
25 class AutomationProvider; | 25 class AutomationProvider; |
26 class Browser; | 26 class Browser; |
27 class Extension; | 27 class Extension; |
28 class ExtensionProcessManager; | 28 class ExtensionProcessManager; |
29 class NavigationController; | 29 class NavigationController; |
30 class SavePackage; | 30 class SavePackage; |
31 class TabContents; | 31 class TabContents; |
| 32 class TranslateInfoBarDelegate; |
32 | 33 |
33 namespace IPC { | 34 namespace IPC { |
34 class Message; | 35 class Message; |
35 } | 36 } |
36 | 37 |
37 class InitialLoadObserver : public NotificationObserver { | 38 class InitialLoadObserver : public NotificationObserver { |
38 public: | 39 public: |
39 InitialLoadObserver(size_t tab_count, AutomationProvider* automation); | 40 InitialLoadObserver(size_t tab_count, AutomationProvider* automation); |
40 ~InitialLoadObserver(); | 41 ~InitialLoadObserver(); |
41 | 42 |
(...skipping 437 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
479 | 480 |
480 private: | 481 private: |
481 NotificationRegistrar registrar_; | 482 NotificationRegistrar registrar_; |
482 | 483 |
483 typedef std::map<std::string, int> EventDurationMap; | 484 typedef std::map<std::string, int> EventDurationMap; |
484 EventDurationMap durations_; | 485 EventDurationMap durations_; |
485 | 486 |
486 DISALLOW_COPY_AND_ASSIGN(MetricEventDurationObserver); | 487 DISALLOW_COPY_AND_ASSIGN(MetricEventDurationObserver); |
487 }; | 488 }; |
488 | 489 |
| 490 class PageTranslatedObserver : public NotificationObserver { |
| 491 public: |
| 492 PageTranslatedObserver(AutomationProvider* automation, |
| 493 IPC::Message* reply_message, |
| 494 TabContents* tab_contents); |
| 495 |
| 496 // NotificationObserver interface. |
| 497 virtual void Observe(NotificationType type, |
| 498 const NotificationSource& source, |
| 499 const NotificationDetails& details); |
| 500 |
| 501 private: |
| 502 NotificationRegistrar registrar_; |
| 503 scoped_refptr<AutomationProvider> automation_; |
| 504 IPC::Message* reply_message_; |
| 505 |
| 506 DISALLOW_COPY_AND_ASSIGN(PageTranslatedObserver); |
| 507 }; |
| 508 |
| 509 class TabLanguageDeterminedObserver : public NotificationObserver { |
| 510 public: |
| 511 TabLanguageDeterminedObserver(AutomationProvider* automation, |
| 512 IPC::Message* reply_message, |
| 513 TabContents* tab_contents, |
| 514 TranslateInfoBarDelegate* translate_bar); |
| 515 |
| 516 // NotificationObserver interface. |
| 517 virtual void Observe(NotificationType type, |
| 518 const NotificationSource& source, |
| 519 const NotificationDetails& details); |
| 520 |
| 521 private: |
| 522 NotificationRegistrar registrar_; |
| 523 AutomationProvider* automation_; |
| 524 IPC::Message* reply_message_; |
| 525 TabContents* tab_contents_; |
| 526 TranslateInfoBarDelegate* translate_bar_; |
| 527 |
| 528 DISALLOW_COPY_AND_ASSIGN(TabLanguageDeterminedObserver); |
| 529 }; |
| 530 |
489 #if defined(OS_CHROMEOS) | 531 #if defined(OS_CHROMEOS) |
490 // Collects LOGIN_AUTHENTICATION notifications and returns | 532 // Collects LOGIN_AUTHENTICATION notifications and returns |
491 // whether authentication succeeded to the automation provider. | 533 // whether authentication succeeded to the automation provider. |
492 class LoginManagerObserver : public NotificationObserver { | 534 class LoginManagerObserver : public NotificationObserver { |
493 public: | 535 public: |
494 LoginManagerObserver(AutomationProvider* automation, | 536 LoginManagerObserver(AutomationProvider* automation, |
495 IPC::Message* reply_message); | 537 IPC::Message* reply_message); |
496 | 538 |
497 // NotificationObserver interface. | 539 // NotificationObserver interface. |
498 virtual void Observe(NotificationType type, const NotificationSource& source, | 540 virtual void Observe(NotificationType type, const NotificationSource& source, |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
729 NotificationRegistrar registrar_; | 771 NotificationRegistrar registrar_; |
730 AutomationProvider* automation_; | 772 AutomationProvider* automation_; |
731 IPC::Message* reply_message_; | 773 IPC::Message* reply_message_; |
732 TabContents* tab_contents_; | 774 TabContents* tab_contents_; |
733 int count_; | 775 int count_; |
734 | 776 |
735 DISALLOW_COPY_AND_ASSIGN(WaitForInfobarCountObserver); | 777 DISALLOW_COPY_AND_ASSIGN(WaitForInfobarCountObserver); |
736 }; | 778 }; |
737 | 779 |
738 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 780 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
OLD | NEW |