Home | History | Annotate | Download | only in browser_plugin
      1 // Copyright 2013 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 "content/common/browser_plugin/browser_plugin_constants.h"
      6 
      7 namespace content {
      8 
      9 namespace browser_plugin {
     10 
     11 // Method bindings.
     12 const char kMethodBack[] = "back";
     13 const char kMethodCanGoBack[] = "canGoBack";
     14 const char kMethodCanGoForward[] = "canGoForward";
     15 const char kMethodForward[] = "forward";
     16 const char kMethodGetInstanceId[] = "getInstanceId";
     17 const char kMethodGetGuestInstanceId[] = "getGuestInstanceId";
     18 const char kMethodGo[] = "go";
     19 const char kMethodReload[] = "reload";
     20 const char kMethodStop[] = "stop";
     21 const char kMethodTerminate[] = "terminate";
     22 
     23 // Internal method bindings.
     24 const char kMethodInternalAttach[] = "-internal-attach";
     25 const char kMethodInternalAttachWindowTo[] = "-internal-attachWindowTo";
     26 const char kMethodInternalTrackObjectLifetime[] =
     27     "-internal-trackObjectLifetime";
     28 
     29 // Internal events.
     30 const char kEventInternalInstanceIDAllocated[] = "instanceid-allocated";
     31 const char kEventInternalTrackedObjectGone[] = "trackedobjectgone";
     32 
     33 // Attributes.
     34 const char kAttributeApi[] = "api";
     35 const char kAttributeAutoSize[] = "autosize";
     36 const char kAttributeContentWindow[] = "contentWindow";
     37 const char kAttributeMaxHeight[] = "maxheight";
     38 const char kAttributeMaxWidth[] = "maxwidth";
     39 const char kAttributeMinHeight[] = "minheight";
     40 const char kAttributeMinWidth[] = "minwidth";
     41 const char kAttributeName[] = "name";
     42 const char kAttributePartition[] = "partition";
     43 const char kAttributeSrc[] = "src";
     44 
     45 // Events.
     46 const char kEventSizeChanged[] = "sizechanged";
     47 
     48 // Parameters/properties on events.
     49 const char kDefaultPromptText[] = "defaultPromptText";
     50 const char kId[] = "id";
     51 const char kInitialHeight[] = "initialHeight";
     52 const char kInitialWidth[] = "initialWidth";
     53 const char kLastUnlockedBySelf[] = "lastUnlockedBySelf";
     54 const char kMessageText[] = "messageText";
     55 const char kMessageType[] = "messageType";
     56 const char kName[] = "name";
     57 const char kNewHeight[] = "newHeight";
     58 const char kNewWidth[] = "newWidth";
     59 const char kOldHeight[] = "oldHeight";
     60 const char kOldWidth[] = "oldWidth";
     61 const char kPermission[] = "permission";
     62 const char kPermissionTypeDialog[] = "dialog";
     63 const char kPermissionTypeDownload[] = "download";
     64 const char kPermissionTypeGeolocation[] = "geolocation";
     65 const char kPermissionTypeMedia[] = "media";
     66 const char kPermissionTypeNewWindow[] = "newwindow";
     67 const char kPermissionTypePointerLock[] = "pointerLock";
     68 const char kPersistPrefix[] = "persist:";
     69 const char kProcessId[] = "processId";
     70 const char kRequestId[] = "requestId";
     71 const char kRequestMethod[] = "requestMethod";
     72 const char kTargetURL[] = "targetUrl";
     73 const char kURL[] = "url";
     74 const char kWindowID[] = "windowId";
     75 const char kWindowOpenDisposition[] = "windowOpenDisposition";
     76 const char kUserGesture[] = "userGesture";
     77 
     78 // Error messages.
     79 const char kErrorAlreadyNavigated[] =
     80     "The object has already navigated, so its partition cannot be changed.";
     81 const char kErrorInvalidPartition[] =
     82     "Invalid partition attribute.";
     83 const char kErrorCannotRemovePartition[] =
     84     "Cannot remove partition attribute after navigating.";
     85 
     86 // Other.
     87 const char kBrowserPluginGuestManagerKeyName[] = "browser_plugin_guest_manager";
     88 const int kInstanceIDNone = 0;
     89 const int kInvalidPermissionRequestID = 0;
     90 
     91 }  // namespace browser_plugin
     92 
     93 }  // namespace content
     94