| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2010 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. | |
| 4 | |
| 5 // Constants used to encode requests and responses for automation. | |
| 6 | |
| 7 #ifndef CHROME_BROWSER_AUTOMATION_EXTENSION_AUTOMATION_CONSTANTS_H_ | |
| 8 #define CHROME_BROWSER_AUTOMATION_EXTENSION_AUTOMATION_CONSTANTS_H_ | |
| 9 #pragma once | |
| 10 | |
| 11 namespace extension_automation_constants { | |
| 12 | |
| 13 // All extension automation related messages will have this origin. | |
| 14 extern const char kAutomationOrigin[]; | |
| 15 // Key used for all extension automation request types. | |
| 16 extern const char kAutomationRequestIdKey[]; | |
| 17 | |
| 18 // Keys used for API communications | |
| 19 extern const char kAutomationHasCallbackKey[]; | |
| 20 extern const char kAutomationErrorKey[]; // not present implies success | |
| 21 extern const char kAutomationNameKey[]; | |
| 22 extern const char kAutomationArgsKey[]; | |
| 23 extern const char kAutomationResponseKey[]; | |
| 24 // All external API requests have this target. | |
| 25 extern const char kAutomationRequestTarget[]; | |
| 26 // All API responses should have this target. | |
| 27 extern const char kAutomationResponseTarget[]; | |
| 28 | |
| 29 // Keys used for port communications | |
| 30 extern const char kAutomationConnectionIdKey[]; | |
| 31 extern const char kAutomationMessageDataKey[]; | |
| 32 extern const char kAutomationExtensionIdKey[]; | |
| 33 extern const char kAutomationPortIdKey[]; | |
| 34 extern const char kAutomationChannelNameKey[]; | |
| 35 extern const char kAutomationTabJsonKey[]; | |
| 36 | |
| 37 // All external port message requests should have this target. | |
| 38 extern const char kAutomationPortRequestTarget[]; | |
| 39 // All external port message responses have this target. | |
| 40 extern const char kAutomationPortResponseTarget[]; | |
| 41 | |
| 42 // All external browser events have this target. | |
| 43 extern const char kAutomationBrowserEventRequestTarget[]; | |
| 44 | |
| 45 // The command codes for our private port protocol. | |
| 46 enum PrivatePortCommand { | |
| 47 OPEN_CHANNEL = 0, | |
| 48 CHANNEL_OPENED = 1, | |
| 49 POST_MESSAGE = 2, | |
| 50 CHANNEL_CLOSED = 3, | |
| 51 }; | |
| 52 | |
| 53 }; // namespace automation_extension_constants | |
| 54 | |
| 55 #endif // CHROME_BROWSER_AUTOMATION_EXTENSION_AUTOMATION_CONSTANTS_H_ | |
| OLD | NEW |