| OLD | NEW |
| 1 // Copyright (c) 2010 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 // This implements a browser-side endpoint for UI automation activity. | 5 // This implements a browser-side endpoint for UI automation activity. |
| 6 // The client-side endpoint is implemented by AutomationProxy. | 6 // The client-side endpoint is implemented by AutomationProxy. |
| 7 // The entire lifetime of this object should be contained within that of | 7 // The entire lifetime of this object should be contained within that of |
| 8 // the BrowserProcess, and in particular the NotificationService that's | 8 // the BrowserProcess, and in particular the NotificationService that's |
| 9 // hung off of it. | 9 // hung off of it. |
| 10 | 10 |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 43 struct ExternalTabSettings; | 43 struct ExternalTabSettings; |
| 44 } | 44 } |
| 45 | 45 |
| 46 class AutomationExtensionTracker; | 46 class AutomationExtensionTracker; |
| 47 class Extension; | 47 class Extension; |
| 48 class ExtensionPortContainer; | 48 class ExtensionPortContainer; |
| 49 class ExtensionTestResultNotificationObserver; | 49 class ExtensionTestResultNotificationObserver; |
| 50 class ExternalTabContainer; | 50 class ExternalTabContainer; |
| 51 class LoginHandler; | 51 class LoginHandler; |
| 52 class MetricEventDurationObserver; | 52 class MetricEventDurationObserver; |
| 53 class InitialLoadObserver; | |
| 54 class NavigationControllerRestoredObserver; | 53 class NavigationControllerRestoredObserver; |
| 55 struct AutocompleteMatchData; | 54 struct AutocompleteMatchData; |
| 56 | 55 |
| 57 namespace gfx { | 56 namespace gfx { |
| 58 class Point; | 57 class Point; |
| 59 } | 58 } |
| 60 | 59 |
| 61 class AutomationProvider : public base::RefCounted<AutomationProvider>, | 60 class AutomationProvider : public base::RefCounted<AutomationProvider>, |
| 62 public IPC::Channel::Listener, | 61 public IPC::Channel::Listener, |
| 63 public IPC::Message::Sender { | 62 public IPC::Message::Sender { |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 370 void GetPrefsInfo(Browser* browser, | 369 void GetPrefsInfo(Browser* browser, |
| 371 DictionaryValue* args, | 370 DictionaryValue* args, |
| 372 IPC::Message* reply_message); | 371 IPC::Message* reply_message); |
| 373 | 372 |
| 374 // Set prefs. | 373 // Set prefs. |
| 375 // Uses the JSON interface for input/output. | 374 // Uses the JSON interface for input/output. |
| 376 void SetPrefs(Browser* browser, | 375 void SetPrefs(Browser* browser, |
| 377 DictionaryValue* args, | 376 DictionaryValue* args, |
| 378 IPC::Message* reply_message); | 377 IPC::Message* reply_message); |
| 379 | 378 |
| 380 // Return load times of initial tabs. | |
| 381 // Uses the JSON interface for input/output. | |
| 382 // Only includes tabs from command line arguments or session restore. | |
| 383 // See declaration of InitialLoadObserver in automation_provider_observers.h | |
| 384 // for example response. | |
| 385 void GetInitialLoadTimes(Browser* browser, | |
| 386 DictionaryValue* args, | |
| 387 IPC::Message* reply_message); | |
| 388 | |
| 389 // Get info about plugins. | 379 // Get info about plugins. |
| 390 // Uses the JSON interface for input/output. | 380 // Uses the JSON interface for input/output. |
| 391 void GetPluginsInfo(Browser* browser, | 381 void GetPluginsInfo(Browser* browser, |
| 392 DictionaryValue* args, | 382 DictionaryValue* args, |
| 393 IPC::Message* reply_message); | 383 IPC::Message* reply_message); |
| 394 | 384 |
| 395 // Enable a plugin. | 385 // Enable a plugin. |
| 396 // Uses the JSON interface for input/output. | 386 // Uses the JSON interface for input/output. |
| 397 void EnablePlugin(Browser* browser, | 387 void EnablePlugin(Browser* browser, |
| 398 DictionaryValue* args, | 388 DictionaryValue* args, |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 void OnBrowserMoved(int handle); | 763 void OnBrowserMoved(int handle); |
| 774 | 764 |
| 775 ExternalTabContainer* GetExternalTabForHandle(int handle); | 765 ExternalTabContainer* GetExternalTabForHandle(int handle); |
| 776 #endif // defined(OS_WIN) | 766 #endif // defined(OS_WIN) |
| 777 | 767 |
| 778 typedef ObserverList<NotificationObserver> NotificationObserverList; | 768 typedef ObserverList<NotificationObserver> NotificationObserverList; |
| 779 typedef std::map<NavigationController*, LoginHandler*> LoginHandlerMap; | 769 typedef std::map<NavigationController*, LoginHandler*> LoginHandlerMap; |
| 780 typedef std::map<int, ExtensionPortContainer*> PortContainerMap; | 770 typedef std::map<int, ExtensionPortContainer*> PortContainerMap; |
| 781 | 771 |
| 782 scoped_ptr<IPC::ChannelProxy> channel_; | 772 scoped_ptr<IPC::ChannelProxy> channel_; |
| 783 scoped_ptr<InitialLoadObserver> initial_load_observer_; | 773 scoped_ptr<NotificationObserver> initial_load_observer_; |
| 784 scoped_ptr<NotificationObserver> new_tab_ui_load_observer_; | 774 scoped_ptr<NotificationObserver> new_tab_ui_load_observer_; |
| 785 scoped_ptr<NotificationObserver> find_in_page_observer_; | 775 scoped_ptr<NotificationObserver> find_in_page_observer_; |
| 786 scoped_ptr<NotificationObserver> dom_operation_observer_; | 776 scoped_ptr<NotificationObserver> dom_operation_observer_; |
| 787 scoped_ptr<NotificationObserver> dom_inspector_observer_; | 777 scoped_ptr<NotificationObserver> dom_inspector_observer_; |
| 788 scoped_ptr<ExtensionTestResultNotificationObserver> | 778 scoped_ptr<ExtensionTestResultNotificationObserver> |
| 789 extension_test_result_observer_; | 779 extension_test_result_observer_; |
| 790 scoped_ptr<MetricEventDurationObserver> metric_event_duration_observer_; | 780 scoped_ptr<MetricEventDurationObserver> metric_event_duration_observer_; |
| 791 scoped_ptr<AutomationBrowserTracker> browser_tracker_; | 781 scoped_ptr<AutomationBrowserTracker> browser_tracker_; |
| 792 scoped_ptr<AutomationExtensionTracker> extension_tracker_; | 782 scoped_ptr<AutomationExtensionTracker> extension_tracker_; |
| 793 scoped_ptr<AutomationTabTracker> tab_tracker_; | 783 scoped_ptr<AutomationTabTracker> tab_tracker_; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 850 virtual void Observe(NotificationType type, | 840 virtual void Observe(NotificationType type, |
| 851 const NotificationSource& source, | 841 const NotificationSource& source, |
| 852 const NotificationDetails& details); | 842 const NotificationDetails& details); |
| 853 | 843 |
| 854 void OnRemoveProvider(); // Called via PostTask | 844 void OnRemoveProvider(); // Called via PostTask |
| 855 | 845 |
| 856 NotificationRegistrar registrar_; | 846 NotificationRegistrar registrar_; |
| 857 }; | 847 }; |
| 858 | 848 |
| 859 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ | 849 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ |
| OLD | NEW |