| 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; |
| 53 class NavigationControllerRestoredObserver; | 54 class NavigationControllerRestoredObserver; |
| 54 struct AutocompleteMatchData; | 55 struct AutocompleteMatchData; |
| 55 | 56 |
| 56 namespace gfx { | 57 namespace gfx { |
| 57 class Point; | 58 class Point; |
| 58 } | 59 } |
| 59 | 60 |
| 60 class AutomationProvider : public base::RefCounted<AutomationProvider>, | 61 class AutomationProvider : public base::RefCounted<AutomationProvider>, |
| 61 public IPC::Channel::Listener, | 62 public IPC::Channel::Listener, |
| 62 public IPC::Message::Sender { | 63 public IPC::Message::Sender { |
| (...skipping 306 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 369 void GetPrefsInfo(Browser* browser, | 370 void GetPrefsInfo(Browser* browser, |
| 370 DictionaryValue* args, | 371 DictionaryValue* args, |
| 371 IPC::Message* reply_message); | 372 IPC::Message* reply_message); |
| 372 | 373 |
| 373 // Set prefs. | 374 // Set prefs. |
| 374 // Uses the JSON interface for input/output. | 375 // Uses the JSON interface for input/output. |
| 375 void SetPrefs(Browser* browser, | 376 void SetPrefs(Browser* browser, |
| 376 DictionaryValue* args, | 377 DictionaryValue* args, |
| 377 IPC::Message* reply_message); | 378 IPC::Message* reply_message); |
| 378 | 379 |
| 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 |
| 379 // Get info about plugins. | 389 // Get info about plugins. |
| 380 // Uses the JSON interface for input/output. | 390 // Uses the JSON interface for input/output. |
| 381 void GetPluginsInfo(Browser* browser, | 391 void GetPluginsInfo(Browser* browser, |
| 382 DictionaryValue* args, | 392 DictionaryValue* args, |
| 383 IPC::Message* reply_message); | 393 IPC::Message* reply_message); |
| 384 | 394 |
| 385 // Enable a plugin. | 395 // Enable a plugin. |
| 386 // Uses the JSON interface for input/output. | 396 // Uses the JSON interface for input/output. |
| 387 void EnablePlugin(Browser* browser, | 397 void EnablePlugin(Browser* browser, |
| 388 DictionaryValue* args, | 398 DictionaryValue* args, |
| (...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 763 void OnBrowserMoved(int handle); | 773 void OnBrowserMoved(int handle); |
| 764 | 774 |
| 765 ExternalTabContainer* GetExternalTabForHandle(int handle); | 775 ExternalTabContainer* GetExternalTabForHandle(int handle); |
| 766 #endif // defined(OS_WIN) | 776 #endif // defined(OS_WIN) |
| 767 | 777 |
| 768 typedef ObserverList<NotificationObserver> NotificationObserverList; | 778 typedef ObserverList<NotificationObserver> NotificationObserverList; |
| 769 typedef std::map<NavigationController*, LoginHandler*> LoginHandlerMap; | 779 typedef std::map<NavigationController*, LoginHandler*> LoginHandlerMap; |
| 770 typedef std::map<int, ExtensionPortContainer*> PortContainerMap; | 780 typedef std::map<int, ExtensionPortContainer*> PortContainerMap; |
| 771 | 781 |
| 772 scoped_ptr<IPC::ChannelProxy> channel_; | 782 scoped_ptr<IPC::ChannelProxy> channel_; |
| 773 scoped_ptr<NotificationObserver> initial_load_observer_; | 783 scoped_ptr<InitialLoadObserver> initial_load_observer_; |
| 774 scoped_ptr<NotificationObserver> new_tab_ui_load_observer_; | 784 scoped_ptr<NotificationObserver> new_tab_ui_load_observer_; |
| 775 scoped_ptr<NotificationObserver> find_in_page_observer_; | 785 scoped_ptr<NotificationObserver> find_in_page_observer_; |
| 776 scoped_ptr<NotificationObserver> dom_operation_observer_; | 786 scoped_ptr<NotificationObserver> dom_operation_observer_; |
| 777 scoped_ptr<NotificationObserver> dom_inspector_observer_; | 787 scoped_ptr<NotificationObserver> dom_inspector_observer_; |
| 778 scoped_ptr<ExtensionTestResultNotificationObserver> | 788 scoped_ptr<ExtensionTestResultNotificationObserver> |
| 779 extension_test_result_observer_; | 789 extension_test_result_observer_; |
| 780 scoped_ptr<MetricEventDurationObserver> metric_event_duration_observer_; | 790 scoped_ptr<MetricEventDurationObserver> metric_event_duration_observer_; |
| 781 scoped_ptr<AutomationBrowserTracker> browser_tracker_; | 791 scoped_ptr<AutomationBrowserTracker> browser_tracker_; |
| 782 scoped_ptr<AutomationExtensionTracker> extension_tracker_; | 792 scoped_ptr<AutomationExtensionTracker> extension_tracker_; |
| 783 scoped_ptr<AutomationTabTracker> tab_tracker_; | 793 scoped_ptr<AutomationTabTracker> tab_tracker_; |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 840 virtual void Observe(NotificationType type, | 850 virtual void Observe(NotificationType type, |
| 841 const NotificationSource& source, | 851 const NotificationSource& source, |
| 842 const NotificationDetails& details); | 852 const NotificationDetails& details); |
| 843 | 853 |
| 844 void OnRemoveProvider(); // Called via PostTask | 854 void OnRemoveProvider(); // Called via PostTask |
| 845 | 855 |
| 846 NotificationRegistrar registrar_; | 856 NotificationRegistrar registrar_; |
| 847 }; | 857 }; |
| 848 | 858 |
| 849 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ | 859 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ |
| OLD | NEW |