| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 5 #ifndef CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 6 #define CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <string> | 9 #include <string> |
| 10 #include <vector> | 10 #include <vector> |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 void PerformActionOnInfobar(Browser* browser, | 283 void PerformActionOnInfobar(Browser* browser, |
| 284 base::DictionaryValue* args, | 284 base::DictionaryValue* args, |
| 285 IPC::Message* reply_message); | 285 IPC::Message* reply_message); |
| 286 | 286 |
| 287 // Create a new profile and open a new browser window with this profile. Uses | 287 // Create a new profile and open a new browser window with this profile. Uses |
| 288 // the JSON interface for input/output. | 288 // the JSON interface for input/output. |
| 289 void OpenNewBrowserWindowWithNewProfile( | 289 void OpenNewBrowserWindowWithNewProfile( |
| 290 base::DictionaryValue* args, | 290 base::DictionaryValue* args, |
| 291 IPC::Message* reply_message); | 291 IPC::Message* reply_message); |
| 292 | 292 |
| 293 // Open a new browser window. |
| 294 // Uses the JSON interface for input/output. |
| 295 void OpenNewBrowserWindow(base::DictionaryValue* args, |
| 296 IPC::Message* reply_message); |
| 297 // Close a browser window. |
| 298 // Uses the JSON interface for input/output. |
| 299 void CloseBrowserWindow(base::DictionaryValue* args, |
| 300 IPC::Message* reply_message); |
| 301 // Reset to the default theme. |
| 302 // Uses the JSON interface for input/output. |
| 303 void ResetToDefaultTheme(base::DictionaryValue* args, |
| 304 IPC::Message* reply_message); |
| 305 |
| 293 // Get info about multi-profile users. | 306 // Get info about multi-profile users. |
| 294 // Uses the JSON interface for input/output. | 307 // Uses the JSON interface for input/output. |
| 295 void GetMultiProfileInfo( | 308 void GetMultiProfileInfo( |
| 296 base::DictionaryValue* args, | 309 base::DictionaryValue* args, |
| 297 IPC::Message* reply_message); | 310 IPC::Message* reply_message); |
| 298 // Open a new browser window for an existing profile. | 311 // Open a new browser window for an existing profile. |
| 299 // Uses the JSON interface for input/output. | 312 // Uses the JSON interface for input/output. |
| 300 void OpenProfileWindow( | 313 void OpenProfileWindow( |
| 301 base::DictionaryValue* args, IPC::Message* reply_message); | 314 base::DictionaryValue* args, IPC::Message* reply_message); |
| 302 | 315 |
| 303 // Get info about the chromium/chrome in use. | 316 // Get info about the chromium/chrome in use. |
| 304 // This includes things like version, executable name, executable path. | 317 // This includes things like version, executable name, executable path. |
| 305 // Uses the JSON interface for input/output. | 318 // Uses the JSON interface for input/output. |
| 306 void GetBrowserInfo(base::DictionaryValue* args, | 319 void GetBrowserInfo(base::DictionaryValue* args, |
| 307 IPC::Message* reply_message); | 320 IPC::Message* reply_message); |
| 308 | 321 |
| 322 // Get the browser window count. Uses the JSON interface. |
| 323 void GetBrowserWindowCountJSON(base::DictionaryValue* args, |
| 324 IPC::Message* reply_message); |
| 325 |
| 309 // Get info about browser-related processes that currently exist. | 326 // Get info about browser-related processes that currently exist. |
| 310 void GetProcessInfo(base::DictionaryValue* args, | 327 void GetProcessInfo(base::DictionaryValue* args, |
| 311 IPC::Message* reply_message); | 328 IPC::Message* reply_message); |
| 312 | 329 |
| 313 // Get info about the state of navigation in a given tab. | 330 // Get info about the state of navigation in a given tab. |
| 314 // This includes ssl info. | 331 // This includes ssl info. |
| 315 // Uses the JSON interface for input/output. | 332 // Uses the JSON interface for input/output. |
| 316 void GetNavigationInfo(Browser* browser, | 333 void GetNavigationInfo(Browser* browser, |
| 317 base::DictionaryValue* args, | 334 base::DictionaryValue* args, |
| 318 IPC::Message* reply_message); | 335 IPC::Message* reply_message); |
| (...skipping 291 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 610 // Append a command-line switch. | 627 // Append a command-line switch. |
| 611 // Uses the JSON interface for input/output. | 628 // Uses the JSON interface for input/output. |
| 612 void AppendSwitchASCIIToCommandLine(base::DictionaryValue* args, | 629 void AppendSwitchASCIIToCommandLine(base::DictionaryValue* args, |
| 613 IPC::Message* reply_message); | 630 IPC::Message* reply_message); |
| 614 | 631 |
| 615 // Responds to the Find request and returns the match count. | 632 // Responds to the Find request and returns the match count. |
| 616 void FindInPage(Browser* browser, | 633 void FindInPage(Browser* browser, |
| 617 base::DictionaryValue* args, | 634 base::DictionaryValue* args, |
| 618 IPC::Message* reply_message); | 635 IPC::Message* reply_message); |
| 619 | 636 |
| 637 // Opens the find request dialogue in the given browser. |
| 638 // Example: |
| 639 // input: { "windex": 1 } |
| 640 // output: none |
| 641 void OpenFindInPage(base::DictionaryValue* args, |
| 642 IPC::Message* reply_message); |
| 643 |
| 644 // Returns whether the find request dialogue is visible in the given browser. |
| 645 // Example: |
| 646 // input: { "windex": 1 } |
| 647 // output: { "is_visible": true } |
| 648 void IsFindInPageVisible(base::DictionaryValue* args, |
| 649 IPC::Message* reply_message); |
| 650 |
| 620 // Returns information about translation for a given tab. Includes | 651 // Returns information about translation for a given tab. Includes |
| 621 // information about the translate bar if it is showing. | 652 // information about the translate bar if it is showing. |
| 622 void GetTranslateInfo(Browser* browser, | 653 void GetTranslateInfo(Browser* browser, |
| 623 base::DictionaryValue* args, | 654 base::DictionaryValue* args, |
| 624 IPC::Message* reply_message); | 655 IPC::Message* reply_message); |
| 625 | 656 |
| 626 // Takes the specified action on the translate bar. | 657 // Takes the specified action on the translate bar. |
| 627 // Uses the JSON interface for input/output. | 658 // Uses the JSON interface for input/output. |
| 628 void SelectTranslateOption(Browser* browser, | 659 void SelectTranslateOption(Browser* browser, |
| 629 base::DictionaryValue* args, | 660 base::DictionaryValue* args, |
| (...skipping 1023 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1653 #endif // defined(OS_CHROMEOS) | 1684 #endif // defined(OS_CHROMEOS) |
| 1654 | 1685 |
| 1655 void WaitForTabCountToBecome(int browser_handle, | 1686 void WaitForTabCountToBecome(int browser_handle, |
| 1656 int target_tab_count, | 1687 int target_tab_count, |
| 1657 IPC::Message* reply_message); | 1688 IPC::Message* reply_message); |
| 1658 | 1689 |
| 1659 void WaitForInfoBarCount(int tab_handle, | 1690 void WaitForInfoBarCount(int tab_handle, |
| 1660 size_t target_count, | 1691 size_t target_count, |
| 1661 IPC::Message* reply_message); | 1692 IPC::Message* reply_message); |
| 1662 | 1693 |
| 1663 // Resets to the default theme. | |
| 1664 void ResetToDefaultTheme(); | |
| 1665 | |
| 1666 void WaitForProcessLauncherThreadToGoIdle(IPC::Message* reply_message); | 1694 void WaitForProcessLauncherThreadToGoIdle(IPC::Message* reply_message); |
| 1667 | 1695 |
| 1668 void OnRemoveProvider(); // Called via PostTask | 1696 void OnRemoveProvider(); // Called via PostTask |
| 1669 | 1697 |
| 1670 // Execute Javascript in the context of a specific render view. | 1698 // Execute Javascript in the context of a specific render view. |
| 1671 void ExecuteJavascriptInRenderViewFrame( | 1699 void ExecuteJavascriptInRenderViewFrame( |
| 1672 const string16& frame_xpath, const string16& script, | 1700 const string16& frame_xpath, const string16& script, |
| 1673 IPC::Message* reply_message, content::RenderViewHost* render_view_host); | 1701 IPC::Message* reply_message, content::RenderViewHost* render_view_host); |
| 1674 | 1702 |
| 1675 // Selects the given |tab| if not selected already. | 1703 // Selects the given |tab| if not selected already. |
| (...skipping 24 matching lines...) Expand all Loading... |
| 1700 scoped_ptr<AutomationEventQueue> automation_event_queue_; | 1728 scoped_ptr<AutomationEventQueue> automation_event_queue_; |
| 1701 | 1729 |
| 1702 // List of commands which just finish synchronously and don't require | 1730 // List of commands which just finish synchronously and don't require |
| 1703 // setting up an observer. | 1731 // setting up an observer. |
| 1704 static const int kSynchronousCommands[]; | 1732 static const int kSynchronousCommands[]; |
| 1705 | 1733 |
| 1706 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1734 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
| 1707 }; | 1735 }; |
| 1708 | 1736 |
| 1709 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1737 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| OLD | NEW |