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
3 // found in the LICENSE file.
5 #ifndef CHROME_COMMON_AUTOMATION_CONSTANTS_H__
6 #define CHROME_COMMON_AUTOMATION_CONSTANTS_H__
10 namespace automation {
12 // When passing the kTestingChannelID switch to the browser, prepend
13 // this prefix to the channel id to enable the named testing interface.
14 // Named testing interface is used when you want to connect an
15 // AutomationProxy to an already-running browser instance.
16 extern const char kNamedInterfacePrefix[];
18 // Amount of time to wait before querying the browser.
19 static const int kSleepTime = 250;
21 // Recognized by the AutomationProvider's SendWebKeyboardEventToSelectedTab
22 // command. Specifies the type of the keyboard event.
30 // Recognized by the AutomationProvider's SendWebKeyboardEventToSelectedTab
31 // command. Specifies masks to be used in constructing keyboard event modifiers.
32 enum KeyModifierMasks {
33 kShiftKeyMask = 1 << 0,
34 kControlKeyMask = 1 << 1,
36 kMetaKeyMask = 1 << 3,
37 kNumLockKeyMask = 1 << 4,
40 // Recognized by the AutomationProvider's ProcessWebMouseEvent command.
57 } // namespace automation
59 // Used by AutomationProxy, declared here so that other headers don't need
60 // to include automation_proxy.h.
61 enum AutomationLaunchResult {
62 AUTOMATION_LAUNCH_RESULT_INVALID = -1,
65 AUTOMATION_VERSION_MISMATCH,
66 AUTOMATION_CREATE_TAB_FAILED,
67 AUTOMATION_SERVER_CRASHED,
68 AUTOMATION_CHANNEL_ERROR,
71 enum AutomationMsg_NavigationResponseValues {
72 AUTOMATION_MSG_NAVIGATION_ERROR = 0,
73 AUTOMATION_MSG_NAVIGATION_SUCCESS,
74 AUTOMATION_MSG_NAVIGATION_AUTH_NEEDED,
75 AUTOMATION_MSG_NAVIGATION_BLOCKED_BY_MODAL_DIALOG,
78 // Used in the AutomationMsg_GetExtensionProperty to identify which extension
79 // property should be retrieved, instead of having separate messages for each
81 enum AutomationMsg_DEPRECATED_ExtensionProperty {
82 AUTOMATION_MSG_EXTENSION_ID = 0,
83 AUTOMATION_MSG_EXTENSION_NAME,
84 AUTOMATION_MSG_EXTENSION_VERSION,
85 AUTOMATION_MSG_EXTENSION_BROWSER_ACTION_INDEX,
88 // Specifies the font size on a page which is requested by an automation
90 enum AutomationPageFontSize {
98 enum FindInPageDirection { BACK = 0, FWD = 1 };
99 enum FindInPageCase { IGNORE_CASE = 0, CASE_SENSITIVE = 1 };
101 #endif // CHROME_COMMON_AUTOMATION_CONSTANTS_H__