blob: 8c29293e7107d19b40578bfbfa81f016fa06f959 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
|
// Copyright (c) 2009 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
// Constants used to encode requests and responses for automation.
#ifndef CHROME_BROWSER_AUTOMATION_EXTENSION_AUTOMATION_CONSTANTS_H_
#define CHROME_BROWSER_AUTOMATION_EXTENSION_AUTOMATION_CONSTANTS_H_
namespace extension_automation_constants {
// All extension automation related messages will have this origin.
extern const char kAutomationOrigin[];
// Key used for all extension automation request types.
extern const wchar_t kAutomationRequestIdKey[];
// Keys used for API communications
extern const wchar_t kAutomationHasCallbackKey[];
extern const wchar_t kAutomationErrorKey[]; // not present implies success
extern const wchar_t kAutomationNameKey[];
extern const wchar_t kAutomationArgsKey[];
extern const wchar_t kAutomationResponseKey[];
// All external API requests have this target.
extern const char kAutomationRequestTarget[];
// All API responses should have this target.
extern const char kAutomationResponseTarget[];
// Keys used for port communications
extern const wchar_t kAutomationConnectionIdKey[];
extern const wchar_t kAutomationMessageDataKey[];
extern const wchar_t kAutomationExtensionIdKey[];
extern const wchar_t kAutomationPortIdKey[];
extern const wchar_t kAutomationChannelNameKey[];
extern const wchar_t kAutomationTabJsonKey[];
// All external port message requests should have this target.
extern const char kAutomationPortRequestTarget[];
// All external port message responses have this target.
extern const char kAutomationPortResponseTarget[];
// All external browser events have this target.
extern const char kAutomationBrowserEventRequestTarget[];
// The command codes for our private port protocol.
enum PrivatePortCommand {
OPEN_CHANNEL = 0,
CHANNEL_OPENED = 1,
POST_MESSAGE = 2,
CHANNEL_CLOSED = 3,
};
}; // namespace automation_extension_constants
#endif // CHROME_BROWSER_AUTOMATION_EXTENSION_AUTOMATION_CONSTANTS_H_
|