1 // Copyright 2014 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 #include "extensions/browser/guest_view/web_view/web_view_constants.h"
10 const char kAttributeAllowTransparency
[] = "allowtransparency";
11 const char kAttributeAllowScaling
[] = "allowscaling";
12 const char kAttributeName
[] = "name";
13 const char kAttributeSrc
[] = "src";
16 const char kAPINamespace
[] = "webViewInternal";
18 // API error messages.
19 const char kAPILoadDataInvalidDataURL
[] = "Invalid data URL \"%s\".";
20 const char kAPILoadDataInvalidBaseURL
[] = "Invalid base URL \"%s\".";
21 const char kAPILoadDataInvalidVirtualURL
[] = "Invalid virtual URL \"%s\".";
24 const char kEventBeforeRequest
[] = "webViewInternal.onBeforeRequest";
25 const char kEventBeforeSendHeaders
[] = "webViewInternal.onBeforeSendHeaders";
26 const char kEventClose
[] = "webViewInternal.onClose";
27 const char kEventCompleted
[] = "webViewInternal.onCompleted";
28 const char kEventConsoleMessage
[] = "webViewInternal.onConsoleMessage";
29 const char kEventContentLoad
[] = "webViewInternal.onContentLoad";
30 const char kEventContextMenuShow
[] = "chromeWebViewInternal.onContextMenuShow";
31 const char kEventDialog
[] = "webViewInternal.onDialog";
32 const char kEventDropLink
[] = "webViewInternal.onDropLink";
33 const char kEventExit
[] = "webViewInternal.onExit";
34 const char kEventExitFullscreen
[] = "webViewInternal.onExitFullscreen";
35 const char kEventFindReply
[] = "webViewInternal.onFindReply";
36 const char kEventFrameNameChanged
[] = "webViewInternal.onFrameNameChanged";
37 const char kEventHeadersReceived
[] = "webViewInternal.onHeadersReceived";
38 const char kEventLoadAbort
[] = "webViewInternal.onLoadAbort";
39 const char kEventLoadCommit
[] = "webViewInternal.onLoadCommit";
40 const char kEventLoadProgress
[] = "webViewInternal.onLoadProgress";
41 const char kEventLoadRedirect
[] = "webViewInternal.onLoadRedirect";
42 const char kEventLoadStart
[] = "webViewInternal.onLoadStart";
43 const char kEventLoadStop
[] = "webViewInternal.onLoadStop";
44 const char kEventMessage
[] = "webViewInternal.onMessage";
45 const char kEventNewWindow
[] = "webViewInternal.onNewWindow";
46 const char kEventPermissionRequest
[] = "webViewInternal.onPermissionRequest";
47 const char kEventResponseStarted
[] = "webViewInternal.onResponseStarted";
48 const char kEventResponsive
[] = "webViewInternal.onResponsive";
49 const char kEventSizeChanged
[] = "webViewInternal.onSizeChanged";
50 const char kEventUnresponsive
[] = "webViewInternal.onUnresponsive";
51 const char kEventZoomChange
[] = "webViewInternal.onZoomChange";
53 // Event related constants.
54 const char kWebViewEventPrefix
[] = "webViewInternal.";
56 // Parameters/properties on events.
57 const char kContextMenuItems
[] = "items";
58 const char kDefaultPromptText
[] = "defaultPromptText";
59 const char kFindSearchText
[] = "searchText";
60 const char kFindFinalUpdate
[] = "finalUpdate";
61 const char kInitialHeight
[] = "initialHeight";
62 const char kInitialWidth
[] = "initialWidth";
63 const char kLastUnlockedBySelf
[] = "lastUnlockedBySelf";
64 const char kLevel
[] = "level";
65 const char kLine
[] = "line";
66 const char kMessage
[] = "message";
67 const char kMessageText
[] = "messageText";
68 const char kMessageType
[] = "messageType";
69 const char kName
[] = "name";
70 const char kNewHeight
[] = "newHeight";
71 const char kNewURL
[] = "newUrl";
72 const char kNewWidth
[] = "newWidth";
73 const char kOldHeight
[] = "oldHeight";
74 const char kOldURL
[] = "oldUrl";
75 const char kOrigin
[] = "origin";
76 const char kPermission
[] = "permission";
77 const char kPermissionTypeDialog
[] = "dialog";
78 const char kPermissionTypeDownload
[] = "download";
79 const char kPermissionTypeFileSystem
[] = "filesystem";
80 const char kPermissionTypeFullscreen
[] = "fullscreen";
81 const char kPermissionTypeGeolocation
[] = "geolocation";
82 const char kPermissionTypeLoadPlugin
[] = "loadplugin";
83 const char kPermissionTypeMedia
[] = "media";
84 const char kPermissionTypeNewWindow
[] = "newwindow";
85 const char kPermissionTypePointerLock
[] = "pointerLock";
86 const char kOldWidth
[] = "oldWidth";
87 const char kProcessId
[] = "processId";
88 const char kProgress
[] = "progress";
89 const char kReason
[] = "reason";
90 const char kRequestId
[] = "requestId";
91 const char kRequestInfo
[] = "requestInfo";
92 const char kSourceId
[] = "sourceId";
93 const char kTargetURL
[] = "targetUrl";
94 const char kWindowID
[] = "windowId";
95 const char kWindowOpenDisposition
[] = "windowOpenDisposition";
96 const char kOldZoomFactor
[] = "oldZoomFactor";
97 const char kNewZoomFactor
[] = "newZoomFactor";
99 // Internal parameters/properties on events.
100 const char kInternalBaseURLForDataURL
[] = "baseUrlForDataUrl";
101 const char kInternalCurrentEntryIndex
[] = "currentEntryIndex";
102 const char kInternalEntryCount
[] = "entryCount";
103 const char kInternalProcessId
[] = "processId";
105 // Parameters to callback functions.
106 const char kFindNumberOfMatches
[] = "numberOfMatches";
107 const char kFindActiveMatchOrdinal
[] = "activeMatchOrdinal";
108 const char kFindSelectionRect
[] = "selectionRect";
109 const char kFindRectLeft
[] = "left";
110 const char kFindRectTop
[] = "top";
111 const char kFindRectWidth
[] = "width";
112 const char kFindRectHeight
[] = "height";
113 const char kFindCanceled
[] = "canceled";
115 // Initialization parameters.
116 const char kInitialZoomFactor
[] = "initialZoomFactor";
117 const char kParameterUserAgentOverride
[] = "userAgentOverride";
120 const char kMenuItemCommandId
[] = "commandId";
121 const char kMenuItemLabel
[] = "label";
122 const char kPersistPrefix
[] = "persist:";
123 const char kStoragePartitionId
[] = "partition";
124 const unsigned int kMaxOutstandingPermissionRequests
= 1024;
125 const int kInvalidPermissionRequestID
= 0;
127 // ClearData API constants.
128 const uint32 WEB_VIEW_REMOVE_DATA_MASK_APPCACHE
= 1 << 0;
129 const uint32 WEB_VIEW_REMOVE_DATA_MASK_CACHE
= 1 << 1;
130 const uint32 WEB_VIEW_REMOVE_DATA_MASK_COOKIES
= 1 << 2;
131 const uint32 WEB_VIEW_REMOVE_DATA_MASK_FILE_SYSTEMS
= 1 << 3;
132 const uint32 WEB_VIEW_REMOVE_DATA_MASK_INDEXEDDB
= 1 << 4;
133 const uint32 WEB_VIEW_REMOVE_DATA_MASK_LOCAL_STORAGE
= 1 << 5;
134 const uint32 WEB_VIEW_REMOVE_DATA_MASK_WEBSQL
= 1 << 6;
137 const char kWebViewContentScriptManagerKeyName
[] =
138 "web_view_content_script_manager";
139 } // namespace webview