Avi Drissman | 3e1a26c | 2022-09-15 20:26:03 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
[email protected] | 3d2c6fb | 2011-07-06 22:26:45 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
[email protected] | 42ce29d | 2011-01-20 23:19:46 | [diff] [blame] | 4 | |
| 5 | #include "ui/base/ui_base_switches.h" |
| 6 | |
Xiaohan Wang | 8407409 | 2022-01-20 21:25:54 | [diff] [blame] | 7 | #include "build/build_config.h" |
| 8 | |
[email protected] | 42ce29d | 2011-01-20 23:19:46 | [diff] [blame] | 9 | namespace switches { |
| 10 | |
Xiaohan Wang | 8407409 | 2022-01-20 21:25:54 | [diff] [blame] | 11 | #if BUILDFLAG(IS_ANDROID) |
Robert Flack | 9db8fcd | 2021-07-08 14:15:16 | [diff] [blame] | 12 | // Disable overscroll edge effects like those found in Android views. |
| 13 | const char kDisableOverscrollEdgeEffect[] = "disable-overscroll-edge-effect"; |
| 14 | |
| 15 | // Disable the pull-to-refresh effect when vertically overscrolling content. |
| 16 | const char kDisablePullToRefreshEffect[] = "disable-pull-to-refresh-effect"; |
| 17 | #endif |
| 18 | |
Xiaohan Wang | 8407409 | 2022-01-20 21:25:54 | [diff] [blame] | 19 | #if BUILDFLAG(IS_MAC) |
Elly Fong-Jones | 1bfb96c | 2018-03-21 22:41:57 | [diff] [blame] | 20 | // Disable animations for showing and hiding modal dialogs. |
| 21 | const char kDisableModalAnimations[] = "disable-modal-animations"; |
| 22 | |
ccameron | 469fd3d | 2015-08-21 00:36:59 | [diff] [blame] | 23 | // Show borders around CALayers corresponding to overlays and partial damage. |
| 24 | const char kShowMacOverlayBorders[] = "show-mac-overlay-borders"; |
[email protected] | efe4d0a | 2014-03-04 01:06:32 | [diff] [blame] | 25 | #endif |
| 26 | |
Eriko Kurimoto | 9a9177d | 2022-05-10 01:25:55 | [diff] [blame] | 27 | #if BUILDFLAG(IS_CHROMEOS) |
| 28 | // Enable resources file sharing with ash-chrome. |
Eriko Kurimoto | 4363d39e | 2022-05-11 02:48:44 | [diff] [blame] | 29 | // This flag is enabled when feature::kLacrosResourcesFileSharing is set and |
| 30 | // ash-side operation is successfully done. |
Eriko Kurimoto | 656a8dac | 2022-05-19 05:43:43 | [diff] [blame] | 31 | const char kEnableResourcesFileSharing[] = "enable-resources-file-sharing"; |
Eriko Kurimoto | 9a9177d | 2022-05-10 01:25:55 | [diff] [blame] | 32 | #endif |
| 33 | |
Alex Zhang | e32a2ca3 | 2017-08-09 14:50:30 | [diff] [blame] | 34 | // Disables layer-edge anti-aliasing in the compositor. |
| 35 | const char kDisableCompositedAntialiasing[] = "disable-composited-antialiasing"; |
| 36 | |
[email protected] | 0a2703fd | 2013-04-12 16:14:08 | [diff] [blame] | 37 | // Disables use of DWM composition for top level windows. |
| 38 | const char kDisableDwmComposition[] = "disable-dwm-composition"; |
| 39 | |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 40 | // Disables touch event based drag and drop. |
| 41 | const char kDisableTouchDragDrop[] = "disable-touch-drag-drop"; |
| 42 | |
Joel Hockey | ba0a4527 | 2019-09-30 22:49:58 | [diff] [blame] | 43 | // Disable re-use of non-exact resources to fulfill ResourcePool requests. |
| 44 | // Intended only for use in layout or pixel tests to reduce noise. |
| 45 | const char kDisallowNonExactResourceReuse[] = |
| 46 | "disallow-non-exact-resource-reuse"; |
| 47 | |
[email protected] | 1400e6dc | 2013-04-27 02:36:27 | [diff] [blame] | 48 | // Enables touch event based drag and drop. |
[email protected] | 2d481774 | 2012-12-17 20:16:18 | [diff] [blame] | 49 | const char kEnableTouchDragDrop[] = "enable-touch-drag-drop"; |
[email protected] | b9c96ff | 2012-11-26 22:24:40 | [diff] [blame] | 50 | |
Elly Fong-Jones | f9289739 | 2019-01-24 16:05:49 | [diff] [blame] | 51 | // Forces the caption style for WebVTT captions. |
| 52 | const char kForceCaptionStyle[] = "force-caption-style"; |
| 53 | |
Leonard Grey | f1a974d | 2018-09-21 22:02:51 | [diff] [blame] | 54 | // Forces dark mode in UI for platforms that support it. |
| 55 | const char kForceDarkMode[] = "force-dark-mode"; |
| 56 | |
Elly Fong-Jones | 1386bee | 2017-12-13 19:35:23 | [diff] [blame] | 57 | // Forces high-contrast mode in native UI drawing, regardless of system |
| 58 | // settings. Note that this has limited effect on Windows: only Aura colors will |
| 59 | // be switched to high contrast, not other system colors. |
| 60 | const char kForceHighContrast[] = "force-high-contrast"; |
| 61 | |
[email protected] | 3455af4e | 2012-03-12 15:35:12 | [diff] [blame] | 62 | // The language file that we want to try to open. Of the form |
[email protected] | 42ce29d | 2011-01-20 23:19:46 | [diff] [blame] | 63 | // language[-country] where language is the 2 letter code from ISO-639. |
[email protected] | f463cd4 | 2012-05-09 16:05:15 | [diff] [blame] | 64 | const char kLang[] = "lang"; |
[email protected] | 42ce29d | 2011-01-20 23:19:46 | [diff] [blame] | 65 | |
Joel Hockey | ba0a4527 | 2019-09-30 22:49:58 | [diff] [blame] | 66 | // Transform localized strings to be longer, with beginning and end markers to |
| 67 | // make truncation visually apparent. |
| 68 | const char kMangleLocalizedStrings[] = "mangle-localized-strings"; |
Alex Zhang | e32a2ca3 | 2017-08-09 14:50:30 | [diff] [blame] | 69 | |
| 70 | // Visualize overdraw by color-coding elements based on if they have other |
| 71 | // elements drawn underneath. This is good for showing where the UI might be |
| 72 | // doing more rendering work than necessary. The colors are hinting at the |
| 73 | // amount of overdraw on your screen for each pixel, as follows: |
| 74 | // |
| 75 | // True color: No overdraw. |
| 76 | // Blue: Overdrawn once. |
| 77 | // Green: Overdrawn twice. |
| 78 | // Pink: Overdrawn three times. |
| 79 | // Red: Overdrawn four or more times. |
| 80 | const char kShowOverdrawFeedback[] = "show-overdraw-feedback"; |
| 81 | |
wutao | 4abd415 | 2017-08-18 23:14:42 | [diff] [blame] | 82 | // Re-draw everything multiple times to simulate a much slower machine. |
| 83 | // Give a slow down factor to cause renderer to take that many times longer to |
| 84 | // complete, such as --slow-down-compositing-scale-factor=2. |
| 85 | const char kSlowDownCompositingScaleFactor[] = |
| 86 | "slow-down-compositing-scale-factor"; |
| 87 | |
Daniele Castagna | ac71d89 | 2020-07-07 17:30:37 | [diff] [blame] | 88 | // Tint composited color. |
| 89 | const char kTintCompositedContent[] = "tint-composited-content"; |
Daniele Castagna | 0fead93e | 2018-01-10 20:40:29 | [diff] [blame] | 90 | |
Joel Hockey | ba0a4527 | 2019-09-30 22:49:58 | [diff] [blame] | 91 | // Controls touch-optimized UI layout for top chrome. |
| 92 | const char kTopChromeTouchUi[] = "top-chrome-touch-ui"; |
| 93 | const char kTopChromeTouchUiAuto[] = "auto"; |
| 94 | const char kTopChromeTouchUiDisabled[] = "disabled"; |
| 95 | const char kTopChromeTouchUiEnabled[] = "enabled"; |
| 96 | |
| 97 | // Disable partial swap which is needed for some OpenGL drivers / emulators. |
| 98 | const char kUIDisablePartialSwap[] = "ui-disable-partial-swap"; |
| 99 | |
| 100 | // Enables the ozone x11 clipboard for linux-chromeos. |
| 101 | const char kUseSystemClipboard[] = "use-system-clipboard"; |
| 102 | |
[email protected] | 42ce29d | 2011-01-20 23:19:46 | [diff] [blame] | 103 | } // namespace switches |