| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 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 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
| 10 #include "base/scoped_ptr.h" | 10 #include "base/scoped_ptr.h" |
| (...skipping 736 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 747 void RestoreAllNTPMostVisitedThumbnails(Browser* browser, | 747 void RestoreAllNTPMostVisitedThumbnails(Browser* browser, |
| 748 DictionaryValue* args, | 748 DictionaryValue* args, |
| 749 IPC::Message* reply_message); | 749 IPC::Message* reply_message); |
| 750 | 750 |
| 751 // Kills the given renderer process and returns after the associated | 751 // Kills the given renderer process and returns after the associated |
| 752 // RenderProcessHost receives notification of its closing. | 752 // RenderProcessHost receives notification of its closing. |
| 753 void KillRendererProcess(Browser* browser, | 753 void KillRendererProcess(Browser* browser, |
| 754 DictionaryValue* args, | 754 DictionaryValue* args, |
| 755 IPC::Message* reply_message); | 755 IPC::Message* reply_message); |
| 756 | 756 |
| 757 // Sends a web keyboard event to the active tab. This should not trigger any | 757 // Populates the fields of the event parameters with what is found |
| 758 // browser hotkeys. | 758 // on the args one. |
| 759 // Uses the JSON interface for input/output. | 759 bool BuildNativeWebKeyEventFromArgs(DictionaryValue* args, |
| 760 void SendKeyEventToActiveTab(Browser* browser, | 760 IPC::Message* reply_message, |
| 761 DictionaryValue* args, | 761 NativeWebKeyboardEvent* event); |
| 762 IPC::Message* reply_message); | 762 |
| 763 // Populates the fields of the event parameters with what is found |
| 764 // on the args one. |
| 765 bool BuildWebKeyEventFromArgs(DictionaryValue* args, |
| 766 IPC::Message* reply_message, |
| 767 NativeWebKeyboardEvent* event); |
| 763 | 768 |
| 764 // Determines whether each relevant section of the NTP is in thumbnail mode. | 769 // Determines whether each relevant section of the NTP is in thumbnail mode. |
| 765 void GetNTPThumbnailMode(Browser* browser, | 770 void GetNTPThumbnailMode(Browser* browser, |
| 766 DictionaryValue* args, | 771 DictionaryValue* args, |
| 767 IPC::Message* reply_message); | 772 IPC::Message* reply_message); |
| 768 | 773 |
| 769 // Puts or removes the specified section of the NTP into/from thumbnail mode. | 774 // Puts or removes the specified section of the NTP into/from thumbnail mode. |
| 770 // If the section is put into thumbnail mode, all other relevant sections are | 775 // If the section is put into thumbnail mode, all other relevant sections are |
| 771 // removed from thumbnail mode. | 776 // removed from thumbnail mode. |
| 772 void SetNTPThumbnailMode(Browser* browser, | 777 void SetNTPThumbnailMode(Browser* browser, |
| (...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 952 // "windowsKeyCode": ui::VKEY_X, | 957 // "windowsKeyCode": ui::VKEY_X, |
| 953 // "unmodifiedText": "x", | 958 // "unmodifiedText": "x", |
| 954 // "text": "X", | 959 // "text": "X", |
| 955 // "modifiers": automation::kShiftKeyMask, | 960 // "modifiers": automation::kShiftKeyMask, |
| 956 // "isSystemKey": false | 961 // "isSystemKey": false |
| 957 // } | 962 // } |
| 958 // output: none | 963 // output: none |
| 959 void SendWebkitKeyEvent(DictionaryValue* args, | 964 void SendWebkitKeyEvent(DictionaryValue* args, |
| 960 IPC::Message* message); | 965 IPC::Message* message); |
| 961 | 966 |
| 967 // Sends the WebKit key event from the OS level to the browser window, |
| 968 // allowing it to be preprocessed by some external application (ie. IME). |
| 969 // Example: |
| 970 // input: { "windex": 1, |
| 971 // "tab_index": 1, |
| 972 // "type": automation::kRawKeyDownType, |
| 973 // "nativeKeyCode": ui::VKEY_X, |
| 974 // "windowsKeyCode": ui::VKEY_X, |
| 975 // "modifiers": automation::kShiftKeyMask, |
| 976 // } |
| 977 // output: none |
| 978 void SendOSLevelKeyEvent(DictionaryValue* args, |
| 979 IPC::Message* message); |
| 980 |
| 962 // Activates the given tab. | 981 // Activates the given tab. |
| 963 // Example: | 982 // Example: |
| 964 // input: { "windex": 1, | 983 // input: { "windex": 1, |
| 965 // "tab_index": 1, | 984 // "tab_index": 1, |
| 966 // } | 985 // } |
| 967 // output: none | 986 // output: none |
| 968 void ActivateTabJSON(DictionaryValue* args, IPC::Message* message); | 987 void ActivateTabJSON(DictionaryValue* args, IPC::Message* message); |
| 969 | 988 |
| 970 #if defined(OS_CHROMEOS) | 989 #if defined(OS_CHROMEOS) |
| 971 void LoginAsGuest(DictionaryValue* args, IPC::Message* reply_message); | 990 void LoginAsGuest(DictionaryValue* args, IPC::Message* reply_message); |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1046 // Used to enumerate browser profiles. | 1065 // Used to enumerate browser profiles. |
| 1047 scoped_refptr<ImporterList> importer_list_; | 1066 scoped_refptr<ImporterList> importer_list_; |
| 1048 | 1067 |
| 1049 // The stored data for the ImportSettings operation. | 1068 // The stored data for the ImportSettings operation. |
| 1050 ImportSettingsData import_settings_data_; | 1069 ImportSettingsData import_settings_data_; |
| 1051 | 1070 |
| 1052 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); | 1071 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); |
| 1053 }; | 1072 }; |
| 1054 | 1073 |
| 1055 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ | 1074 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ |
| OLD | NEW |