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

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

Issue 2280003: Use IPC to wait for download in DownloadTest. (Closed) Base URL: git://codf21.jail.google.com/chromium.git
Patch Set: Fix compile error. Created 10 years, 7 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) 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 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
72 72
73 // Sets the number of tabs that we expect; when this number of tabs has 73 // Sets the number of tabs that we expect; when this number of tabs has
74 // loaded, an AutomationMsg_InitialLoadsComplete message is sent. 74 // loaded, an AutomationMsg_InitialLoadsComplete message is sent.
75 void SetExpectedTabCount(size_t expected_tabs); 75 void SetExpectedTabCount(size_t expected_tabs);
76 76
77 // Add a listener for navigation status notification. Currently only 77 // Add a listener for navigation status notification. Currently only
78 // navigation completion is observed; when the |number_of_navigations| 78 // navigation completion is observed; when the |number_of_navigations|
79 // complete, the completed_response object is sent; if the server requires 79 // complete, the completed_response object is sent; if the server requires
80 // authentication, we instead send the auth_needed_response object. A pointer 80 // authentication, we instead send the auth_needed_response object. A pointer
81 // to the added navigation observer is returned. This object should NOT be 81 // to the added navigation observer is returned. This object should NOT be
82 // deleted and should be released by calling the corresponding 82 // deleted and should be released by calling the RemoveObserver method.
83 // RemoveNavigationStatusListener method.
84 NotificationObserver* AddNavigationStatusListener( 83 NotificationObserver* AddNavigationStatusListener(
85 NavigationController* tab, IPC::Message* reply_message, 84 NavigationController* tab, IPC::Message* reply_message,
86 int number_of_navigations, bool include_current_navigation); 85 int number_of_navigations, bool include_current_navigation);
87 86
88 void RemoveNavigationStatusListener(NotificationObserver* obs);
89
90 // Add an observer for the TabStrip. Currently only Tab append is observed. A 87 // Add an observer for the TabStrip. Currently only Tab append is observed. A
91 // navigation listener is created on successful notification of tab append. A 88 // navigation listener is created on successful notification of tab append. A
92 // pointer to the added navigation observer is returned. This object should 89 // pointer to the added navigation observer is returned. This object should
93 // NOT be deleted and should be released by calling the corresponding 90 // NOT be deleted and should be released by calling the RemoveObserver method.
94 // RemoveTabStripObserver method.
95 NotificationObserver* AddTabStripObserver(Browser* parent, 91 NotificationObserver* AddTabStripObserver(Browser* parent,
96 IPC::Message* reply_message); 92 IPC::Message* reply_message);
97 void RemoveTabStripObserver(NotificationObserver* obs); 93
94 // Remove an observer. The |NotificationObserver| still needs to be deleted
95 // afterwards.
96 void RemoveObserver(NotificationObserver* obs);
98 97
99 // Get the index of a particular NavigationController object 98 // Get the index of a particular NavigationController object
100 // in the given parent window. This method uses 99 // in the given parent window. This method uses
101 // TabStrip::GetIndexForNavigationController to get the index. 100 // TabStrip::GetIndexForNavigationController to get the index.
102 int GetIndexForNavigationController(const NavigationController* controller, 101 int GetIndexForNavigationController(const NavigationController* controller,
103 const Browser* parent) const; 102 const Browser* parent) const;
104 103
105 // Add or remove a non-owning reference to a tab's LoginHandler. This is for 104 // Add or remove a non-owning reference to a tab's LoginHandler. This is for
106 // when a login prompt is shown for HTTP/FTP authentication. 105 // when a login prompt is shown for HTTP/FTP authentication.
107 // TODO(mpcomplete): The login handling is a fairly special purpose feature. 106 // TODO(mpcomplete): The login handling is a fairly special purpose feature.
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
327 void SetBookmarkTitle(int handle, 326 void SetBookmarkTitle(int handle,
328 int64 id, std::wstring title, 327 int64 id, std::wstring title,
329 bool* success); 328 bool* success);
330 void SetBookmarkURL(int handle, 329 void SetBookmarkURL(int handle,
331 int64 id, const GURL& url, 330 int64 id, const GURL& url,
332 bool* success); 331 bool* success);
333 void RemoveBookmark(int handle, 332 void RemoveBookmark(int handle,
334 int64 id, 333 int64 id,
335 bool* success); 334 bool* success);
336 335
336 // Wait for the download shelf to appear or disappear.
337 void WaitForDownloadShelfVisibilityChange(int browser_handle,
338 bool visibility,
339 IPC::Message* reply_message);
337 // Set window dimensions. 340 // Set window dimensions.
338 // Uses the JSON interface for input/output. 341 // Uses the JSON interface for input/output.
339 void SetWindowDimensions(Browser* browser, 342 void SetWindowDimensions(Browser* browser,
340 DictionaryValue* args, 343 DictionaryValue* args,
341 IPC::Message* reply_message); 344 IPC::Message* reply_message);
342 345
343 // Get info about the chromium/chrome in use. 346 // Get info about the chromium/chrome in use.
344 // This includes things like version, executable name, executable path. 347 // This includes things like version, executable name, executable path.
345 // Uses the JSON interface for input/output. 348 // Uses the JSON interface for input/output.
346 void GetBrowserInfo(Browser* browser, 349 void GetBrowserInfo(Browser* browser,
(...skipping 497 matching lines...) Expand 10 before | Expand all | Expand 10 after
844 virtual void Observe(NotificationType type, 847 virtual void Observe(NotificationType type,
845 const NotificationSource& source, 848 const NotificationSource& source,
846 const NotificationDetails& details); 849 const NotificationDetails& details);
847 850
848 void OnRemoveProvider(); // Called via PostTask 851 void OnRemoveProvider(); // Called via PostTask
849 852
850 NotificationRegistrar registrar_; 853 NotificationRegistrar registrar_;
851 }; 854 };
852 855
853 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ 856 #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