Home | History | Annotate | Download | only in tabs
      1 // Copyright (c) 2012 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 "chrome/browser/extensions/api/tabs/tabs_constants.h"
      6 
      7 namespace extensions {
      8 namespace tabs_constants {
      9 
     10 const char kActiveKey[] = "active";
     11 const char kAllFramesKey[] = "allFrames";
     12 const char kAlwaysOnTopKey[] = "alwaysOnTop";
     13 const char kBypassCache[] = "bypassCache";
     14 const char kCodeKey[] = "code";
     15 const char kCurrentWindowKey[] = "currentWindow";
     16 const char kFaviconUrlKey[] = "favIconUrl";
     17 const char kFileKey[] = "file";
     18 const char kFocusedKey[] = "focused";
     19 const char kFormatKey[] = "format";
     20 const char kFromIndexKey[] = "fromIndex";
     21 const char kHeightKey[] = "height";
     22 const char kIdKey[] = "id";
     23 const char kIncognitoKey[] = "incognito";
     24 const char kIndexKey[] = "index";
     25 const char kLastFocusedWindowKey[] = "lastFocusedWindow";
     26 const char kLeftKey[] = "left";
     27 const char kNewPositionKey[] = "newPosition";
     28 const char kNewWindowIdKey[] = "newWindowId";
     29 const char kOldPositionKey[] = "oldPosition";
     30 const char kOldWindowIdKey[] = "oldWindowId";
     31 const char kOpenerTabIdKey[] = "openerTabId";
     32 const char kPinnedKey[] = "pinned";
     33 const char kQualityKey[] = "quality";
     34 const char kHighlightedKey[] = "highlighted";
     35 const char kRunAtKey[] = "runAt";
     36 const char kSelectedKey[] = "selected";
     37 const char kShowStateKey[] = "state";
     38 const char kStatusKey[] = "status";
     39 const char kTabIdKey[] = "tabId";
     40 const char kTabIdsKey[] = "tabIds";
     41 const char kTabsKey[] = "tabs";
     42 const char kTitleKey[] = "title";
     43 const char kToIndexKey[] = "toIndex";
     44 const char kTopKey[] = "top";
     45 const char kUrlKey[] = "url";
     46 const char kWindowClosing[] = "isWindowClosing";
     47 const char kWidthKey[] = "width";
     48 const char kWindowIdKey[] = "windowId";
     49 const char kWindowTypeKey[] = "type";
     50 const char kWindowTypeLongKey[] = "windowType";
     51 
     52 const char kFormatValueJpeg[] = "jpeg";
     53 const char kFormatValuePng[] = "png";
     54 const char kMimeTypeJpeg[] = "image/jpeg";
     55 const char kMimeTypePng[] = "image/png";
     56 const char kShowStateValueNormal[] = "normal";
     57 const char kShowStateValueMinimized[] = "minimized";
     58 const char kShowStateValueMaximized[] = "maximized";
     59 const char kShowStateValueFullscreen[] = "fullscreen";
     60 const char kStatusValueComplete[] = "complete";
     61 const char kStatusValueLoading[] = "loading";
     62 
     63 // TODO(mpcomplete): should we expose more specific detail, like devtools, app
     64 // panel, etc?
     65 const char kWindowTypeValueNormal[] = "normal";
     66 const char kWindowTypeValuePopup[] = "popup";
     67 const char kWindowTypeValuePanel[] = "panel";
     68 const char kWindowTypeValueDetachedPanel[] = "detached_panel";
     69 const char kWindowTypeValueApp[] = "app";
     70 
     71 const char kCanOnlyMoveTabsWithinNormalWindowsError[] = "Tabs can only be "
     72     "moved to and from normal windows.";
     73 const char kCanOnlyMoveTabsWithinSameProfileError[] = "Tabs can only be moved "
     74     "between windows in the same profile.";
     75 const char kNoCrashBrowserError[] =
     76     "I'm sorry. I'm afraid I can't do that.";
     77 const char kNoCurrentWindowError[] = "No current window";
     78 const char kNoLastFocusedWindowError[] = "No last-focused window";
     79 const char kWindowNotFoundError[] = "No window with id: *.";
     80 const char kTabIndexNotFoundError[] = "No tab at index: *.";
     81 const char kTabNotFoundError[] = "No tab with id: *.";
     82 const char kTabStripNotEditableError[] =
     83     "Tabs cannot be edited right now (user may be dragging a tab).";
     84 const char kNoSelectedTabError[] = "No selected tab";
     85 const char kNoHighlightedTabError[] = "No highlighted tab";
     86 const char kIncognitoModeIsDisabled[] = "Incognito mode is disabled.";
     87 const char kIncognitoModeIsForced[] = "Incognito mode is forced. "
     88     "Cannot open normal windows.";
     89 const char kURLsNotAllowedInIncognitoError[] = "Cannot open URL \"*\" "
     90     "in an incognito window.";
     91 const char kInvalidUrlError[] = "Invalid url: \"*\".";
     92 const char kInternalVisibleTabCaptureError[] =
     93     "Internal error while trying to capture visible region of the current tab";
     94 const char kNotImplementedError[] = "This call is not yet implemented";
     95 const char kSupportedInWindowsOnlyError[] = "Supported in Windows only";
     96 const char kInvalidWindowTypeError[] = "Invalid value for type";
     97 const char kInvalidWindowStateError[] = "Invalid value for state";
     98 const char kScreenshotsDisabled[] = "Taking screenshots has been disabled";
     99 
    100 const char kNoCodeOrFileToExecuteError[] = "No source code or file specified.";
    101 const char kMoreThanOneValuesError[] = "Code and file should not be specified "
    102     "at the same time in the second argument.";
    103 const char kLoadFileError[] = "Failed to load file: \"*\". ";
    104 const char kCannotDetermineLanguageOfUnloadedTab[] =
    105     "Cannot determine language: tab not loaded";
    106 
    107 }  // namespace tabs_constants
    108 }  // namespace extensions
    109