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 309 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
320 void SetBookmarkTitle(int handle, | 320 void SetBookmarkTitle(int handle, |
321 int64 id, std::wstring title, | 321 int64 id, std::wstring title, |
322 bool* success); | 322 bool* success); |
323 void SetBookmarkURL(int handle, | 323 void SetBookmarkURL(int handle, |
324 int64 id, const GURL& url, | 324 int64 id, const GURL& url, |
325 bool* success); | 325 bool* success); |
326 void RemoveBookmark(int handle, | 326 void RemoveBookmark(int handle, |
327 int64 id, | 327 int64 id, |
328 bool* success); | 328 bool* success); |
329 | 329 |
330 // Util for creating a JSON error return string (dict with key | |
331 // 'error' and error string value). No need to quote input. | |
332 std::string JSONErrorString(std::string err); | |
333 | |
334 // Set window dimensions. | 330 // Set window dimensions. |
335 // Uses the JSON interface for input/output. | 331 // Uses the JSON interface for input/output. |
336 void SetWindowDimensions(Browser* browser, | 332 void SetWindowDimensions(Browser* browser, |
337 DictionaryValue* args, | 333 DictionaryValue* args, |
338 IPC::Message* reply_message); | 334 IPC::Message* reply_message); |
339 | 335 |
340 // Get info about the chromium/chrome in use. | 336 // Get info about the chromium/chrome in use. |
341 // This includes things like version, executable name, executable path. | 337 // This includes things like version, executable name, executable path. |
342 // Uses the JSON interface for input/output. | 338 // Uses the JSON interface for input/output. |
343 void GetBrowserInfo(Browser* browser, | 339 void GetBrowserInfo(Browser* browser, |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
435 void OmniboxAcceptInput(Browser* browser, | 431 void OmniboxAcceptInput(Browser* browser, |
436 DictionaryValue* args, | 432 DictionaryValue* args, |
437 IPC::Message* reply_message); | 433 IPC::Message* reply_message); |
438 | 434 |
439 // Save the contents of a tab into a file. | 435 // Save the contents of a tab into a file. |
440 // Uses the JSON interface for input/output. | 436 // Uses the JSON interface for input/output. |
441 void SaveTabContents(Browser* browser, | 437 void SaveTabContents(Browser* browser, |
442 DictionaryValue* args, | 438 DictionaryValue* args, |
443 IPC::Message* reply_message); | 439 IPC::Message* reply_message); |
444 | 440 |
441 // Util for creating a JSON error return string (dict with key | |
442 // 'error' and error string value). No need to quote input. | |
443 static std::string JSONErrorString(std::string err); | |
Paweł Hajdan Jr.
2010/06/29 17:43:19
nit: "std::string err" -> "const std::string& err"
| |
444 | |
445 // Generic pattern for pyautolib | 445 // Generic pattern for pyautolib |
446 // Uses the JSON interface for input/output. | 446 // Uses the JSON interface for input/output. |
447 void SendJSONRequest(int handle, | 447 void SendJSONRequest(int handle, |
448 std::string json_request, | 448 std::string json_request, |
449 IPC::Message* reply_message); | 449 IPC::Message* reply_message); |
450 | 450 |
451 // Method ptr for json handlers. | 451 // Method ptr for json handlers. |
452 // Uses the JSON interface for input/output. | 452 // Uses the JSON interface for input/output. |
453 typedef void (AutomationProvider::*JsonHandler)(Browser* browser, | 453 typedef void (AutomationProvider::*JsonHandler)(Browser* browser, |
454 DictionaryValue*, | 454 DictionaryValue*, |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
860 virtual void Observe(NotificationType type, | 860 virtual void Observe(NotificationType type, |
861 const NotificationSource& source, | 861 const NotificationSource& source, |
862 const NotificationDetails& details); | 862 const NotificationDetails& details); |
863 | 863 |
864 void OnRemoveProvider(); // Called via PostTask | 864 void OnRemoveProvider(); // Called via PostTask |
865 | 865 |
866 NotificationRegistrar registrar_; | 866 NotificationRegistrar registrar_; |
867 }; | 867 }; |
868 | 868 |
869 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ | 869 #endif // CHROME_BROWSER_AUTOMATION_AUTOMATION_PROVIDER_H_ |
OLD | NEW |