| 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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 TabContents* tab_contents_; | 691 TabContents* tab_contents_; |
| 692 TranslateInfoBarDelegate* translate_bar_; | 692 TranslateInfoBarDelegate* translate_bar_; |
| 693 | 693 |
| 694 DISALLOW_COPY_AND_ASSIGN(TabLanguageDeterminedObserver); | 694 DISALLOW_COPY_AND_ASSIGN(TabLanguageDeterminedObserver); |
| 695 }; | 695 }; |
| 696 | 696 |
| 697 class InfoBarCountObserver : public NotificationObserver { | 697 class InfoBarCountObserver : public NotificationObserver { |
| 698 public: | 698 public: |
| 699 InfoBarCountObserver(AutomationProvider* automation, | 699 InfoBarCountObserver(AutomationProvider* automation, |
| 700 IPC::Message* reply_message, | 700 IPC::Message* reply_message, |
| 701 TabContents* tab_contents, | 701 TabContentsWrapper* tab_contents, |
| 702 size_t target_count); | 702 size_t target_count); |
| 703 virtual ~InfoBarCountObserver(); | 703 virtual ~InfoBarCountObserver(); |
| 704 | 704 |
| 705 // NotificationObserver interface. | 705 // NotificationObserver interface. |
| 706 virtual void Observe(NotificationType type, | 706 virtual void Observe(NotificationType type, |
| 707 const NotificationSource& source, | 707 const NotificationSource& source, |
| 708 const NotificationDetails& details); | 708 const NotificationDetails& details); |
| 709 | 709 |
| 710 private: | 710 private: |
| 711 // Checks whether the infobar count matches our target, and if so | 711 // Checks whether the infobar count matches our target, and if so |
| 712 // sends the reply message and deletes itself. | 712 // sends the reply message and deletes itself. |
| 713 void CheckCount(); | 713 void CheckCount(); |
| 714 | 714 |
| 715 NotificationRegistrar registrar_; | 715 NotificationRegistrar registrar_; |
| 716 base::WeakPtr<AutomationProvider> automation_; | 716 base::WeakPtr<AutomationProvider> automation_; |
| 717 scoped_ptr<IPC::Message> reply_message_; | 717 scoped_ptr<IPC::Message> reply_message_; |
| 718 TabContents* tab_contents_; | 718 TabContentsWrapper* tab_contents_; |
| 719 | 719 |
| 720 const size_t target_count_; | 720 const size_t target_count_; |
| 721 | 721 |
| 722 DISALLOW_COPY_AND_ASSIGN(InfoBarCountObserver); | 722 DISALLOW_COPY_AND_ASSIGN(InfoBarCountObserver); |
| 723 }; | 723 }; |
| 724 | 724 |
| 725 #if defined(OS_CHROMEOS) | 725 #if defined(OS_CHROMEOS) |
| 726 class LoginObserver : public chromeos::LoginStatusConsumer, | 726 class LoginObserver : public chromeos::LoginStatusConsumer, |
| 727 public NotificationObserver { | 727 public NotificationObserver { |
| 728 public: | 728 public: |
| (...skipping 798 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1527 // Sends the |reply_message_| to |automation_| indicating we're done. | 1527 // Sends the |reply_message_| to |automation_| indicating we're done. |
| 1528 void RunOnUIThread(); | 1528 void RunOnUIThread(); |
| 1529 | 1529 |
| 1530 base::WeakPtr<AutomationProvider> automation_; | 1530 base::WeakPtr<AutomationProvider> automation_; |
| 1531 scoped_ptr<IPC::Message> reply_message_; | 1531 scoped_ptr<IPC::Message> reply_message_; |
| 1532 | 1532 |
| 1533 DISALLOW_COPY_AND_ASSIGN(WaitForProcessLauncherThreadToGoIdleObserver); | 1533 DISALLOW_COPY_AND_ASSIGN(WaitForProcessLauncherThreadToGoIdleObserver); |
| 1534 }; | 1534 }; |
| 1535 | 1535 |
| 1536 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 1536 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
| OLD | NEW |