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 #pragma once | 7 #pragma once |
8 | 8 |
9 #include <deque> | 9 #include <deque> |
10 #include <map> | 10 #include <map> |
(...skipping 466 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
477 | 477 |
478 private: | 478 private: |
479 int target_count_; | 479 int target_count_; |
480 content::NotificationRegistrar registrar_; | 480 content::NotificationRegistrar registrar_; |
481 base::WeakPtr<AutomationProvider> automation_; | 481 base::WeakPtr<AutomationProvider> automation_; |
482 scoped_ptr<IPC::Message> reply_message_; | 482 scoped_ptr<IPC::Message> reply_message_; |
483 | 483 |
484 DISALLOW_COPY_AND_ASSIGN(BrowserCountChangeNotificationObserver); | 484 DISALLOW_COPY_AND_ASSIGN(BrowserCountChangeNotificationObserver); |
485 }; | 485 }; |
486 | 486 |
487 class AppModalDialogShownObserver : public content::NotificationObserver { | |
488 public: | |
489 AppModalDialogShownObserver(AutomationProvider* automation, | |
490 IPC::Message* reply_message); | |
491 virtual ~AppModalDialogShownObserver(); | |
492 | |
493 virtual void Observe(int type, | |
494 const content::NotificationSource& source, | |
495 const content::NotificationDetails& details); | |
496 | |
497 private: | |
498 content::NotificationRegistrar registrar_; | |
499 base::WeakPtr<AutomationProvider> automation_; | |
500 scoped_ptr<IPC::Message> reply_message_; | |
501 | |
502 DISALLOW_COPY_AND_ASSIGN(AppModalDialogShownObserver); | |
503 }; | |
504 | |
505 class ExecuteBrowserCommandObserver : public content::NotificationObserver { | 487 class ExecuteBrowserCommandObserver : public content::NotificationObserver { |
506 public: | 488 public: |
507 virtual ~ExecuteBrowserCommandObserver(); | 489 virtual ~ExecuteBrowserCommandObserver(); |
508 | 490 |
509 static bool CreateAndRegisterObserver(AutomationProvider* automation, | 491 static bool CreateAndRegisterObserver(AutomationProvider* automation, |
510 Browser* browser, | 492 Browser* browser, |
511 int command, | 493 int command, |
512 IPC::Message* reply_message); | 494 IPC::Message* reply_message); |
513 | 495 |
514 virtual void Observe(int type, | 496 virtual void Observe(int type, |
(...skipping 1295 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1810 private: | 1792 private: |
1811 base::WeakPtr<AutomationProvider> automation_; | 1793 base::WeakPtr<AutomationProvider> automation_; |
1812 scoped_ptr<IPC::Message> reply_message_; | 1794 scoped_ptr<IPC::Message> reply_message_; |
1813 std::string extension_id_; | 1795 std::string extension_id_; |
1814 content::NotificationRegistrar registrar_; | 1796 content::NotificationRegistrar registrar_; |
1815 | 1797 |
1816 DISALLOW_COPY_AND_ASSIGN(ExtensionPopupObserver); | 1798 DISALLOW_COPY_AND_ASSIGN(ExtensionPopupObserver); |
1817 }; | 1799 }; |
1818 | 1800 |
1819 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ | 1801 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_OBSERVERS_H_ |
OLD | NEW |