Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(904)

Side by Side Diff: chrome/browser/automation/automation_provider.h

Issue 174015: Add automation call to wait for multiple navigations. (Closed)
Patch Set: backwards compatibility, properly done Created 11 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2006-2008 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2006-2008 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 51 matching lines...) Expand 10 before | Expand all | Expand 10 after
62 // Establishes a connection to an automation client, if present. 62 // Establishes a connection to an automation client, if present.
63 // An AutomationProxy should be established (probably in a different process) 63 // An AutomationProxy should be established (probably in a different process)
64 // before calling this. 64 // before calling this.
65 void ConnectToChannel(const std::string& channel_id); 65 void ConnectToChannel(const std::string& channel_id);
66 66
67 // Sets the number of tabs that we expect; when this number of tabs has 67 // Sets the number of tabs that we expect; when this number of tabs has
68 // loaded, an AutomationMsg_InitialLoadsComplete message is sent. 68 // loaded, an AutomationMsg_InitialLoadsComplete message is sent.
69 void SetExpectedTabCount(size_t expected_tabs); 69 void SetExpectedTabCount(size_t expected_tabs);
70 70
71 // Add a listener for navigation status notification. Currently only 71 // Add a listener for navigation status notification. Currently only
72 // navigation completion is observed; when the navigation completes, the 72 // navigation completion is observed; when the |number_of_navigations|
73 // completed_response object is sent; if the server requires authentication, 73 // complete, the completed_response object is sent; if the server requires
74 // we instead send the auth_needed_response object. A pointer to the added 74 // authentication, we instead send the auth_needed_response object. A pointer
75 // navigation observer is returned. This object should NOT be deleted and 75 // to the added navigation observer is returned. This object should NOT be
76 // should be released by calling the corresponding 76 // deleted and should be released by calling the corresponding
77 // RemoveNavigationStatusListener method. 77 // RemoveNavigationStatusListener method.
78 NotificationObserver* AddNavigationStatusListener( 78 NotificationObserver* AddNavigationStatusListener(
79 NavigationController* tab, IPC::Message* reply_message); 79 NavigationController* tab, IPC::Message* reply_message,
80 int number_of_navigations);
80 81
81 void RemoveNavigationStatusListener(NotificationObserver* obs); 82 void RemoveNavigationStatusListener(NotificationObserver* obs);
82 83
83 // Add an observer for the TabStrip. Currently only Tab append is observed. A 84 // Add an observer for the TabStrip. Currently only Tab append is observed. A
84 // navigation listener is created on successful notification of tab append. A 85 // navigation listener is created on successful notification of tab append. A
85 // pointer to the added navigation observer is returned. This object should 86 // pointer to the added navigation observer is returned. This object should
86 // NOT be deleted and should be released by calling the corresponding 87 // NOT be deleted and should be released by calling the corresponding
87 // RemoveTabStripObserver method. 88 // RemoveTabStripObserver method.
88 NotificationObserver* AddTabStripObserver(Browser* parent, 89 NotificationObserver* AddTabStripObserver(Browser* parent,
89 IPC::Message* reply_message); 90 IPC::Message* reply_message);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
191 #if defined(OS_WIN) 192 #if defined(OS_WIN)
192 // TODO(port): Replace HWND. 193 // TODO(port): Replace HWND.
193 void GetTabHWND(int handle, HWND* tab_hwnd); 194 void GetTabHWND(int handle, HWND* tab_hwnd);
194 #endif // defined(OS_WIN) 195 #endif // defined(OS_WIN)
195 void GetTabProcessID(int handle, int* process_id); 196 void GetTabProcessID(int handle, int* process_id);
196 void GetTabTitle(int handle, int* title_string_size, std::wstring* title); 197 void GetTabTitle(int handle, int* title_string_size, std::wstring* title);
197 void GetTabIndex(int handle, int* tabstrip_index); 198 void GetTabIndex(int handle, int* tabstrip_index);
198 void GetTabURL(int handle, bool* success, GURL* url); 199 void GetTabURL(int handle, bool* success, GURL* url);
199 void HandleUnused(const IPC::Message& message, int handle); 200 void HandleUnused(const IPC::Message& message, int handle);
200 void NavigateToURL(int handle, const GURL& url, IPC::Message* reply_message); 201 void NavigateToURL(int handle, const GURL& url, IPC::Message* reply_message);
202 void NavigateToURLBlockUntilNavigationsComplete(int handle, const GURL& url,
203 int number_of_navigations,
204 IPC::Message* reply_message);
201 void NavigationAsync(int handle, const GURL& url, bool* status); 205 void NavigationAsync(int handle, const GURL& url, bool* status);
202 void GoBack(int handle, IPC::Message* reply_message); 206 void GoBack(int handle, IPC::Message* reply_message);
203 void GoForward(int handle, IPC::Message* reply_message); 207 void GoForward(int handle, IPC::Message* reply_message);
204 void Reload(int handle, IPC::Message* reply_message); 208 void Reload(int handle, IPC::Message* reply_message);
205 void SetAuth(int tab_handle, const std::wstring& username, 209 void SetAuth(int tab_handle, const std::wstring& username,
206 const std::wstring& password, IPC::Message* reply_message); 210 const std::wstring& password, IPC::Message* reply_message);
207 void CancelAuth(int tab_handle, IPC::Message* reply_message); 211 void CancelAuth(int tab_handle, IPC::Message* reply_message);
208 void NeedsAuth(int tab_handle, bool* needs_auth); 212 void NeedsAuth(int tab_handle, bool* needs_auth);
209 void GetRedirectsFrom(int tab_handle, 213 void GetRedirectsFrom(int tab_handle,
210 const GURL& source_url, 214 const GURL& source_url,
(...skipping 331 matching lines...) Expand 10 before | Expand all | Expand 10 after
542 virtual void Observe(NotificationType type, 546 virtual void Observe(NotificationType type,
543 const NotificationSource& source, 547 const NotificationSource& source,
544 const NotificationDetails& details); 548 const NotificationDetails& details);
545 549
546 void OnRemoveProvider(); // Called via PostTask 550 void OnRemoveProvider(); // Called via PostTask
547 551
548 NotificationRegistrar registrar_; 552 NotificationRegistrar registrar_;
549 }; 553 };
550 554
551 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ 555 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/automation/automation_provider.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698