Home | History | Annotate | Download | only in base
      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 "ui/base/ui_base_switches.h"
      6 
      7 namespace switches {
      8 
      9 // Disables use of DWM composition for top level windows.
     10 const char kDisableDwmComposition[] = "disable-dwm-composition";
     11 
     12 // Disables the new visual style for application dialogs and controls.
     13 const char kDisableNewDialogStyle[] = "disable-new-dialog-style";
     14 
     15 // Disables touch adjustment.
     16 const char kDisableTouchAdjustment[] = "disable-touch-adjustment";
     17 
     18 // Disables touch event based drag and drop.
     19 const char kDisableTouchDragDrop[] = "disable-touch-drag-drop";
     20 
     21 // Disables controls that support touch base text editing.
     22 const char kDisableTouchEditing[] = "disable-touch-editing";
     23 
     24 // Disables the Views textfield on Windows.
     25 const char kDisableViewsTextfield[] = "disable-views-textfield";
     26 
     27 // Enables the new visual style for application dialogs and controls.
     28 const char kEnableNewDialogStyle[] = "enable-new-dialog-style";
     29 
     30 // Enable scroll prediction for scroll update events.
     31 const char kEnableScrollPrediction[] = "enable-scroll-prediction";
     32 
     33 // Enables touch event based drag and drop.
     34 const char kEnableTouchDragDrop[] = "enable-touch-drag-drop";
     35 
     36 // Enables controls that support touch base text editing.
     37 const char kEnableTouchEditing[] = "enable-touch-editing";
     38 
     39 // Enables the Views textfield on Windows.
     40 const char kEnableViewsTextfield[] = "enable-views-textfield";
     41 
     42 // Enables/Disables High DPI support (windows)
     43 const char kHighDPISupport[] = "high-dpi-support";
     44 
     45 // Overrides the device scale factor for the browser UI and the contents.
     46 const char kForceDeviceScaleFactor[] = "force-device-scale-factor";
     47 
     48 // If a resource is requested at a scale factor at which it is not available
     49 // or the resource is the incorrect size (based on the size of the 1x resource),
     50 // generates the missing resource and applies a red mask to the generated
     51 // resource. Resources for which hidpi is not supported because of software
     52 // reasons will show up pixelated.
     53 const char kHighlightMissingScaledResources[] =
     54     "highlight-missing-scaled-resources";
     55 
     56 // The language file that we want to try to open. Of the form
     57 // language[-country] where language is the 2 letter code from ISO-639.
     58 const char kLang[] = "lang";
     59 
     60 // Load the locale resources from the given path. When running on Mac/Unix the
     61 // path should point to a locale.pak file.
     62 const char kLocalePak[] = "locale_pak";
     63 
     64 // Disable ui::MessageBox. This is useful when running as part of scripts that
     65 // do not have a user interface.
     66 const char kNoMessageBox[] = "no-message-box";
     67 
     68 // Enable support for touch events.
     69 const char kTouchEvents[] = "touch-events";
     70 
     71 // The values the kTouchEvents switch may have, as in --touch-events=disabled.
     72 //   auto: enabled at startup when an attached touchscreen is present.
     73 const char kTouchEventsAuto[] = "auto";
     74 //   enabled: touch events always enabled.
     75 const char kTouchEventsEnabled[] = "enabled";
     76 //   disabled: touch events are disabled.
     77 const char kTouchEventsDisabled[] = "disabled";
     78 
     79 // Enables UI changes that make it easier to use with a touchscreen.
     80 // WARNING: Do not check this flag directly when deciding what UI to draw,
     81 // instead you must call ui::GetDisplayLayout
     82 const char kTouchOptimizedUI[] = "touch-optimized-ui";
     83 
     84 // The values the kTouchOptimizedUI switch may have, as in
     85 // "--touch-optimized-ui=disabled".
     86 //   auto: Enabled on monitors which have touchscreen support (default).
     87 const char kTouchOptimizedUIAuto[] = "auto";
     88 //   enabled: always optimized for touch (even if no touch support).
     89 const char kTouchOptimizedUIEnabled[] = "enabled";
     90 //   disabled: never optimized for touch.
     91 const char kTouchOptimizedUIDisabled[] = "disabled";
     92 
     93 // Enables touch events on the side bezels.
     94 const char kTouchSideBezels[] = "touch-side-bezels";
     95 
     96 #if defined(USE_XI2_MT)
     97 // The calibration factors given as "<left>,<right>,<top>,<bottom>".
     98 const char kTouchCalibration[] = "touch-calibration";
     99 #endif
    100 
    101 #if defined(TOOLKIT_VIEWS) && defined(OS_LINUX)
    102 // Tells chrome to interpret events from these devices as touch events. Only
    103 // available with XInput 2 (i.e. X server 1.8 or above). The id's of the
    104 // devices can be retrieved from 'xinput list'.
    105 const char kTouchDevices[] = "touch-devices";
    106 #endif
    107 
    108 }  // namespace switches
    109