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