Home | History | Annotate | Download | only in web_view
      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.
      4 
      5 #include "extensions/browser/guest_view/web_view/web_view_constants.h"
      6 
      7 namespace webview {
      8 
      9 // Attributes.
     10 const char kAttributeAllowTransparency[] = "allowtransparency";
     11 const char kAttributeAutoSize[] = "autosize";
     12 const char kAttributeMaxHeight[] = "maxheight";
     13 const char kAttributeMaxWidth[] = "maxwidth";
     14 const char kAttributeMinHeight[] = "minheight";
     15 const char kAttributeMinWidth[] = "minwidth";
     16 const char kAttributeName[] = "name";
     17 const char kAttributeSrc[] = "src";
     18 
     19 // API namespace.
     20 const char kAPINamespace[] = "webViewInternal";
     21 
     22 // Events.
     23 const char kEventClose[] = "webViewInternal.onClose";
     24 const char kEventConsoleMessage[] = "webViewInternal.onConsoleMessage";
     25 const char kEventContentLoad[] = "webViewInternal.onContentLoad";
     26 const char kEventContextMenu[] = "chromeWebViewInternal.contextmenu";
     27 const char kEventDialog[] = "webViewInternal.onDialog";
     28 const char kEventExit[] = "webViewInternal.onExit";
     29 const char kEventFindReply[] = "webViewInternal.onFindReply";
     30 const char kEventFrameNameChanged[] = "webViewInternal.onFrameNameChanged";
     31 const char kEventLoadAbort[] = "webViewInternal.onLoadAbort";
     32 const char kEventLoadCommit[] = "webViewInternal.onLoadCommit";
     33 const char kEventLoadProgress[] = "webViewInternal.onLoadProgress";
     34 const char kEventLoadRedirect[] = "webViewInternal.onLoadRedirect";
     35 const char kEventLoadStart[] = "webViewInternal.onLoadStart";
     36 const char kEventLoadStop[] = "webViewInternal.onLoadStop";
     37 const char kEventMessage[] = "webViewInternal.onMessage";
     38 const char kEventNewWindow[] = "webViewInternal.onNewWindow";
     39 const char kEventPermissionRequest[] = "webViewInternal.onPermissionRequest";
     40 const char kEventPluginDestroyed[] = "webViewInternal.onPluginDestroyed";
     41 const char kEventResponsive[] = "webViewInternal.onResponsive";
     42 const char kEventSizeChanged[] = "webViewInternal.onSizeChanged";
     43 const char kEventUnresponsive[] = "webViewInternal.onUnresponsive";
     44 const char kEventZoomChange[] = "webViewInternal.onZoomChange";
     45 
     46 // Event related constants.
     47 const char kWebViewEventPrefix[] = "webViewInternal.";
     48 
     49 // Parameters/properties on events.
     50 const char kContextMenuItems[] = "items";
     51 const char kDefaultPromptText[] = "defaultPromptText";
     52 const char kFindSearchText[] = "searchText";
     53 const char kFindFinalUpdate[] = "finalUpdate";
     54 const char kInitialHeight[] = "initialHeight";
     55 const char kInitialWidth[] = "initialWidth";
     56 const char kLastUnlockedBySelf[] = "lastUnlockedBySelf";
     57 const char kLevel[] = "level";
     58 const char kLine[] = "line";
     59 const char kMessage[] = "message";
     60 const char kMessageText[] = "messageText";
     61 const char kMessageType[] = "messageType";
     62 const char kName[] = "name";
     63 const char kNewHeight[] = "newHeight";
     64 const char kNewURL[] = "newUrl";
     65 const char kNewWidth[] = "newWidth";
     66 const char kOldHeight[] = "oldHeight";
     67 const char kOldURL[] = "oldUrl";
     68 const char kPermission[] = "permission";
     69 const char kPermissionTypeDialog[] = "dialog";
     70 const char kPermissionTypeDownload[] = "download";
     71 const char kPermissionTypeFileSystem[] = "filesystem";
     72 const char kPermissionTypeGeolocation[] = "geolocation";
     73 const char kPermissionTypeLoadPlugin[] = "loadplugin";
     74 const char kPermissionTypeMedia[] = "media";
     75 const char kPermissionTypeNewWindow[] = "newwindow";
     76 const char kPermissionTypePointerLock[] = "pointerLock";
     77 const char kOldWidth[] = "oldWidth";
     78 const char kProcessId[] = "processId";
     79 const char kProgress[] = "progress";
     80 const char kReason[] = "reason";
     81 const char kRequestId[] = "requestId";
     82 const char kSourceId[] = "sourceId";
     83 const char kTargetURL[] = "targetUrl";
     84 const char kWindowID[] = "windowId";
     85 const char kWindowOpenDisposition[] = "windowOpenDisposition";
     86 const char kOldZoomFactor[] = "oldZoomFactor";
     87 const char kNewZoomFactor[] = "newZoomFactor";
     88 
     89 // Internal parameters/properties on events.
     90 const char kInternalBaseURLForDataURL[] = "baseUrlForDataUrl";
     91 const char kInternalCurrentEntryIndex[] = "currentEntryIndex";
     92 const char kInternalEntryCount[] = "entryCount";
     93 const char kInternalProcessId[] = "processId";
     94 
     95 // Parameters to callback functions.
     96 const char kFindNumberOfMatches[] = "numberOfMatches";
     97 const char kFindActiveMatchOrdinal[] = "activeMatchOrdinal";
     98 const char kFindSelectionRect[] = "selectionRect";
     99 const char kFindRectLeft[] = "left";
    100 const char kFindRectTop[] = "top";
    101 const char kFindRectWidth[] = "width";
    102 const char kFindRectHeight[] = "height";
    103 const char kFindCanceled[] = "canceled";
    104 
    105 // Initialization parameters.
    106 const char kParameterUserAgentOverride[] = "userAgentOverride";
    107 
    108 // Miscellaneous.
    109 const char kMenuItemCommandId[] = "commandId";
    110 const char kMenuItemLabel[] = "label";
    111 const char kPersistPrefix[] = "persist:";
    112 const char kStoragePartitionId[] = "storagePartitionId";
    113 const unsigned int kMaxOutstandingPermissionRequests = 1024;
    114 const int kInvalidPermissionRequestID = 0;
    115 
    116 }  // namespace webview
    117