blob: dea4d2d033d0cf74b1bec448eb090e9357612861 (
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
55
|
// Copyright (c) 2010 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_
#pragma once
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 char kAutomationRequestIdKey[];
// Keys used for API communications
extern const char kAutomationHasCallbackKey[];
extern const char kAutomationErrorKey[]; // not present implies success
extern const char kAutomationNameKey[];
extern const char kAutomationArgsKey[];
extern const char 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 char kAutomationConnectionIdKey[];
extern const char kAutomationMessageDataKey[];
extern const char kAutomationExtensionIdKey[];
extern const char kAutomationPortIdKey[];
extern const char kAutomationChannelNameKey[];
extern const char 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_
|