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

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

Issue 6630001: Allow webdriver users to choose between sending the key events when... (Closed) Base URL: http://src.chromium.org/svn/trunk/src/
Patch Set: '' Created 9 years, 9 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 | Annotate | Revision Log
OLDNEW
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 <string>
10
9 #include "base/basictypes.h" 11 #include "base/basictypes.h"
10 #include "base/scoped_ptr.h" 12 #include "base/scoped_ptr.h"
11 #include "chrome/browser/automation/automation_provider.h" 13 #include "chrome/browser/automation/automation_provider.h"
14 #include "chrome/browser/automation/automation_provider_json.h"
12 #include "chrome/browser/browser_list.h" 15 #include "chrome/browser/browser_list.h"
13 #include "chrome/browser/history/history.h" 16 #include "chrome/browser/history/history.h"
14 #include "chrome/browser/importer/importer_list.h" 17 #include "chrome/browser/importer/importer_list.h"
15 #include "chrome/browser/sync/profile_sync_service_harness.h" 18 #include "chrome/browser/sync/profile_sync_service_harness.h"
16 #include "content/common/notification_registrar.h" 19 #include "content/common/notification_registrar.h"
17 #include "content/common/page_type.h" 20 #include "content/common/page_type.h"
18 21
19 class DictionaryValue; 22 class DictionaryValue;
20 class TemplateURLModel; 23 class TemplateURLModel;
21 24
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 void RestoreAllNTPMostVisitedThumbnails(Browser* browser, 750 void RestoreAllNTPMostVisitedThumbnails(Browser* browser,
748 DictionaryValue* args, 751 DictionaryValue* args,
749 IPC::Message* reply_message); 752 IPC::Message* reply_message);
750 753
751 // Kills the given renderer process and returns after the associated 754 // Kills the given renderer process and returns after the associated
752 // RenderProcessHost receives notification of its closing. 755 // RenderProcessHost receives notification of its closing.
753 void KillRendererProcess(Browser* browser, 756 void KillRendererProcess(Browser* browser,
754 DictionaryValue* args, 757 DictionaryValue* args,
755 IPC::Message* reply_message); 758 IPC::Message* reply_message);
756 759
757 // Sends a web keyboard event to the active tab. This should not trigger any 760 // Populates the fields of the event parameters with what is found
758 // browser hotkeys. 761 // on the args one. If fails return false and puts the error message in
759 // Uses the JSON interface for input/output. 762 // the error parameter, else returns true.
760 void SendKeyEventToActiveTab(Browser* browser, 763 bool BuildWebKeyEventFromArgs(DictionaryValue* args,
761 DictionaryValue* args, 764 std::string* error,
762 IPC::Message* reply_message); 765 NativeWebKeyboardEvent* event);
763 766
764 // Determines whether each relevant section of the NTP is in thumbnail mode. 767 // Determines whether each relevant section of the NTP is in thumbnail mode.
765 void GetNTPThumbnailMode(Browser* browser, 768 void GetNTPThumbnailMode(Browser* browser,
766 DictionaryValue* args, 769 DictionaryValue* args,
767 IPC::Message* reply_message); 770 IPC::Message* reply_message);
768 771
769 // Puts or removes the specified section of the NTP into/from thumbnail mode. 772 // 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 773 // If the section is put into thumbnail mode, all other relevant sections are
771 // removed from thumbnail mode. 774 // removed from thumbnail mode.
772 void SetNTPThumbnailMode(Browser* browser, 775 void SetNTPThumbnailMode(Browser* browser,
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 // "windowsKeyCode": ui::VKEY_X, 955 // "windowsKeyCode": ui::VKEY_X,
953 // "unmodifiedText": "x", 956 // "unmodifiedText": "x",
954 // "text": "X", 957 // "text": "X",
955 // "modifiers": automation::kShiftKeyMask, 958 // "modifiers": automation::kShiftKeyMask,
956 // "isSystemKey": false 959 // "isSystemKey": false
957 // } 960 // }
958 // output: none 961 // output: none
959 void SendWebkitKeyEvent(DictionaryValue* args, 962 void SendWebkitKeyEvent(DictionaryValue* args,
960 IPC::Message* message); 963 IPC::Message* message);
961 964
965 // Sends the key event from the OS level to the browser window,
966 // allowing it to be preprocessed by some external application (ie. IME).
967 // Will switch to the tab specified by tab_index before sending the event.
968 // Example:
969 // input: { "windex": 1,
970 // "tab_index": 1,
971 // "keyCode": ui::VKEY_X,
972 // "modifiers": automation::kShiftKeyMask,
973 // }
974 // output: none
975 void SendOSLevelKeyEventToTab(DictionaryValue* args,
976 IPC::Message* message);
977
978 // Method used as a Task that sends a success AutomationJSONReply.
979 void SendSuccessReply(IPC::Message* reply_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 GetLoginInfo(DictionaryValue* args, IPC::Message* reply_message); 990 void GetLoginInfo(DictionaryValue* args, IPC::Message* reply_message);
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after
1049 // Used to enumerate browser profiles. 1068 // Used to enumerate browser profiles.
1050 scoped_refptr<ImporterList> importer_list_; 1069 scoped_refptr<ImporterList> importer_list_;
1051 1070
1052 // The stored data for the ImportSettings operation. 1071 // The stored data for the ImportSettings operation.
1053 ImportSettingsData import_settings_data_; 1072 ImportSettingsData import_settings_data_;
1054 1073
1055 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); 1074 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider);
1056 }; 1075 };
1057 1076
1058 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ 1077 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698