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

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 "base/basictypes.h" 9 #include "base/basictypes.h"
10 #include "base/scoped_ptr.h" 10 #include "base/scoped_ptr.h"
11 #include "chrome/browser/automation/automation_provider.h" 11 #include "chrome/browser/automation/automation_provider.h"
12 #include "chrome/browser/automation/automation_provider_json.h"
12 #include "chrome/browser/browser_list.h" 13 #include "chrome/browser/browser_list.h"
13 #include "chrome/browser/history/history.h" 14 #include "chrome/browser/history/history.h"
14 #include "chrome/browser/importer/importer_list.h" 15 #include "chrome/browser/importer/importer_list.h"
15 #include "chrome/browser/sync/profile_sync_service_harness.h" 16 #include "chrome/browser/sync/profile_sync_service_harness.h"
16 #include "content/common/notification_registrar.h" 17 #include "content/common/notification_registrar.h"
17 #include "content/common/page_type.h" 18 #include "content/common/page_type.h"
18 19
19 class DictionaryValue; 20 class DictionaryValue;
20 class TemplateURLModel; 21 class TemplateURLModel;
21 22
(...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
747 void RestoreAllNTPMostVisitedThumbnails(Browser* browser, 748 void RestoreAllNTPMostVisitedThumbnails(Browser* browser,
748 DictionaryValue* args, 749 DictionaryValue* args,
749 IPC::Message* reply_message); 750 IPC::Message* reply_message);
750 751
751 // Kills the given renderer process and returns after the associated 752 // Kills the given renderer process and returns after the associated
752 // RenderProcessHost receives notification of its closing. 753 // RenderProcessHost receives notification of its closing.
753 void KillRendererProcess(Browser* browser, 754 void KillRendererProcess(Browser* browser,
754 DictionaryValue* args, 755 DictionaryValue* args,
755 IPC::Message* reply_message); 756 IPC::Message* reply_message);
756 757
757 // Sends a web keyboard event to the active tab. This should not trigger any 758 // Populates the fields of the event parameters with what is found
758 // browser hotkeys. 759 // on the args one.
759 // Uses the JSON interface for input/output. 760 bool BuildWebKeyEventFromArgs(DictionaryValue* args,
760 void SendKeyEventToActiveTab(Browser* browser, 761 IPC::Message* reply_message,
761 DictionaryValue* args, 762 NativeWebKeyboardEvent* event);
762 IPC::Message* reply_message);
763 763
764 // Determines whether each relevant section of the NTP is in thumbnail mode. 764 // Determines whether each relevant section of the NTP is in thumbnail mode.
765 void GetNTPThumbnailMode(Browser* browser, 765 void GetNTPThumbnailMode(Browser* browser,
766 DictionaryValue* args, 766 DictionaryValue* args,
767 IPC::Message* reply_message); 767 IPC::Message* reply_message);
768 768
769 // Puts or removes the specified section of the NTP into/from thumbnail mode. 769 // 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 770 // If the section is put into thumbnail mode, all other relevant sections are
771 // removed from thumbnail mode. 771 // removed from thumbnail mode.
772 void SetNTPThumbnailMode(Browser* browser, 772 void SetNTPThumbnailMode(Browser* browser,
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
952 // "windowsKeyCode": ui::VKEY_X, 952 // "windowsKeyCode": ui::VKEY_X,
953 // "unmodifiedText": "x", 953 // "unmodifiedText": "x",
954 // "text": "X", 954 // "text": "X",
955 // "modifiers": automation::kShiftKeyMask, 955 // "modifiers": automation::kShiftKeyMask,
956 // "isSystemKey": false 956 // "isSystemKey": false
957 // } 957 // }
958 // output: none 958 // output: none
959 void SendWebkitKeyEvent(DictionaryValue* args, 959 void SendWebkitKeyEvent(DictionaryValue* args,
960 IPC::Message* message); 960 IPC::Message* message);
961 961
962 // Sends the key event from the OS level to the browser window,
963 // allowing it to be preprocessed by some external application (ie. IME).
964 // Will switch to the tab specified by tab_index before sending the event.
965 // Example:
966 // input: { "windex": 1,
967 // "tab_index": 1,
968 // "nativeKeyCode": ui::VKEY_X,
969 // "windowsKeyCode": ui::VKEY_X,
970 // "modifiers": automation::kShiftKeyMask,
971 // }
972 // output: none
973 void SendOSLevelKeyEvent(DictionaryValue* args,
kkania 2011/03/24 23:20:32 this comment is out of date
timothe 2011/03/25 11:07:59 Done.
974 IPC::Message* message);
975
976 // Method used as a Task that sends a success AutomationJSONReply.
977 void SendSuccessReply(IPC::Message* reply_message);
978
962 // Activates the given tab. 979 // Activates the given tab.
963 // Example: 980 // Example:
964 // input: { "windex": 1, 981 // input: { "windex": 1,
965 // "tab_index": 1, 982 // "tab_index": 1,
966 // } 983 // }
967 // output: none 984 // output: none
968 void ActivateTabJSON(DictionaryValue* args, IPC::Message* message); 985 void ActivateTabJSON(DictionaryValue* args, IPC::Message* message);
969 986
970 #if defined(OS_CHROMEOS) 987 #if defined(OS_CHROMEOS)
971 void GetLoginInfo(DictionaryValue* args, IPC::Message* reply_message); 988 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. 1066 // Used to enumerate browser profiles.
1050 scoped_refptr<ImporterList> importer_list_; 1067 scoped_refptr<ImporterList> importer_list_;
1051 1068
1052 // The stored data for the ImportSettings operation. 1069 // The stored data for the ImportSettings operation.
1053 ImportSettingsData import_settings_data_; 1070 ImportSettingsData import_settings_data_;
1054 1071
1055 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider); 1072 DISALLOW_COPY_AND_ASSIGN(TestingAutomationProvider);
1056 }; 1073 };
1057 1074
1058 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_ 1075 #endif // CHROME_BROWSER_AUTOMATION_TESTING_AUTOMATION_PROVIDER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698