diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 04:14:48 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-11-14 04:14:48 +0000 |
commit | 0d3b9dda19ce9f3fb74e601146ac9f1f1d68dfbe (patch) | |
tree | 39b348736b26c4e45d8fe6fc4ca2054d89b48320 | |
parent | 16dbfb0e842b3ebb5dc156dc4b0990dc7dfa04db (diff) | |
download | chromium_src-0d3b9dda19ce9f3fb74e601146ac9f1f1d68dfbe.zip chromium_src-0d3b9dda19ce9f3fb74e601146ac9f1f1d68dfbe.tar.gz chromium_src-0d3b9dda19ce9f3fb74e601146ac9f1f1d68dfbe.tar.bz2 |
ui/gfx: Create a new gfx switches file to put gfx specific switches there.
BUG=103304
TEST=ui_unittests
R=sky@chromium.org
Review URL: https://chromiumcodereview.appspot.com/11359184
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@167592 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r-- | chrome/browser/about_flags.cc | 3 | ||||
-rw-r--r-- | chrome/browser/chromeos/login/login_utils.cc | 21 | ||||
-rw-r--r-- | ui/base/ui_base_switches.cc | 15 | ||||
-rw-r--r-- | ui/base/ui_base_switches.h | 3 | ||||
-rw-r--r-- | ui/gfx/font_render_params_linux.cc | 2 | ||||
-rw-r--r-- | ui/gfx/image/image_skia_operations.cc | 2 | ||||
-rw-r--r-- | ui/gfx/switches.cc | 26 | ||||
-rw-r--r-- | ui/gfx/switches.h | 20 | ||||
-rw-r--r-- | ui/ui.gyp | 2 |
9 files changed, 63 insertions, 31 deletions
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc index 629cccb..a7c2e28 100644 --- a/chrome/browser/about_flags.cc +++ b/chrome/browser/about_flags.cc @@ -28,6 +28,7 @@ #include "ui/app_list/app_list_switches.h" #include "ui/base/l10n/l10n_util.h" #include "ui/base/ui_base_switches.h" +#include "ui/gfx/switches.h" #include "ui/gl/gl_switches.h" #if defined(USE_ASH) @@ -751,7 +752,7 @@ const Experiment kExperiments[] = { IDS_FLAGS_ENABLE_WEBKIT_TEXT_SUBPIXEL_POSITIONING_NAME, IDS_FLAGS_ENABLE_WEBKIT_TEXT_SUBPIXEL_POSITIONING_DESCRIPTION, kOsCrOS, - SINGLE_VALUE_TYPE(switches::kEnableWebkitTextSubpixelPositioning) + SINGLE_VALUE_TYPE(gfx::switches::kEnableWebkitTextSubpixelPositioning) }, { "enable-touch-events", diff --git a/chrome/browser/chromeos/login/login_utils.cc b/chrome/browser/chromeos/login/login_utils.cc index 1d6b42b..77add68 100644 --- a/chrome/browser/chromeos/login/login_utils.cc +++ b/chrome/browser/chromeos/login/login_utils.cc @@ -89,6 +89,7 @@ #include "net/url_request/url_request_context_getter.h" #include "ui/base/ui_base_switches.h" #include "ui/compositor/compositor_switches.h" +#include "ui/gfx/switches.h" #include "ui/gl/gl_switches.h" #include "webkit/plugins/plugin_switches.h" @@ -757,7 +758,6 @@ std::string LoginUtilsImpl::GetOffTheRecordCommandLine( ::switches::kDisableOobeAnimation, ::switches::kDisableSeccompFilterSandbox, ::switches::kDisableSeccompSandbox, - ::switches::kEnableBrowserTextSubpixelPositioning, ::switches::kEnableCompositingForFixedPosition, ::switches::kEnableEncryptedMedia, ::switches::kEnableGView, @@ -768,7 +768,6 @@ std::string LoginUtilsImpl::GetOffTheRecordCommandLine( ::switches::kEnableSmoothScrolling, ::switches::kEnableThreadedCompositing, ::switches::kEnableViewport, - ::switches::kEnableWebkitTextSubpixelPositioning, ::switches::kDisableThreadedCompositing, ::switches::kForceCompositingMode, ::switches::kGpuStartupDialog, @@ -790,14 +789,6 @@ std::string LoginUtilsImpl::GetOffTheRecordCommandLine( ::switches::kTouchDevices, ::switches::kTouchOptimizedUI, ::switches::kOldCheckboxStyle, - ash::switches::kAshTouchHud, - ash::switches::kAshWindowAnimationsDisabled, - ash::switches::kAuraLegacyPowerButton, - ash::switches::kAuraNoShadows, - ash::switches::kAshDisablePanelFitting, - cc::switches::kDisableThreadedAnimation, - cc::switches::kEnablePartialSwap, - cc::switches::kEnablePinchInCompositor, ::switches::kUIEnablePartialSwap, ::switches::kUIEnableThreadedCompositing, ::switches::kUIPrioritizeInGpuProcess, @@ -806,7 +797,17 @@ std::string LoginUtilsImpl::GetOffTheRecordCommandLine( #endif ::switches::kUseGL, ::switches::kUserDataDir, + ash::switches::kAshTouchHud, + ash::switches::kAshWindowAnimationsDisabled, + ash::switches::kAuraLegacyPowerButton, + ash::switches::kAuraNoShadows, + ash::switches::kAshDisablePanelFitting, + cc::switches::kDisableThreadedAnimation, + cc::switches::kEnablePartialSwap, + cc::switches::kEnablePinchInCompositor, chromeos::switches::kDbusStub, + gfx::switches::kEnableBrowserTextSubpixelPositioning, + gfx::switches::kEnableWebkitTextSubpixelPositioning, }; command_line->CopySwitchesFrom(base_command_line, kForwardSwitches, diff --git a/ui/base/ui_base_switches.cc b/ui/base/ui_base_switches.cc index 2ead2cf..be4639b 100644 --- a/ui/base/ui_base_switches.cc +++ b/ui/base/ui_base_switches.cc @@ -9,27 +9,12 @@ namespace switches { // Enable support for bezel touch. const char kEnableBezelTouch[] = "enable-bezel-touch"; -// Whether or not ImageSkiaOperations methods can scale one of images -// if they don't have the same scale factor. -const char kDisableScalingInImageSkiaOperations[] = - "disable-scaling-in-image-skia-operations"; - -// Let text glyphs have X-positions that aren't snapped to the pixel grid in -// the browser UI. -const char kEnableBrowserTextSubpixelPositioning[] = - "enable-browser-text-subpixel-positioning"; - // Enable support for touch events. const char kEnableTouchEvents[] = "enable-touch-events"; // Enables the Views textfield on Windows. const char kEnableViewsTextfield[] = "enable-views-textfield"; -// Enable text glyphs to have X-positions that aren't snapped to the pixel grid -// in webkit renderers. -const char kEnableWebkitTextSubpixelPositioning[] = - "enable-webkit-text-subpixel-positioning"; - // Overrides the device scale factor for the browser UI and the // contents. const char kForceDeviceScaleFactor[] = "force-device-scale-factor"; diff --git a/ui/base/ui_base_switches.h b/ui/base/ui_base_switches.h index 921ba67..df51831 100644 --- a/ui/base/ui_base_switches.h +++ b/ui/base/ui_base_switches.h @@ -13,11 +13,8 @@ namespace switches { UI_EXPORT extern const char kEnableBezelTouch[]; -UI_EXPORT extern const char kDisableScalingInImageSkiaOperations[]; -UI_EXPORT extern const char kEnableBrowserTextSubpixelPositioning[]; UI_EXPORT extern const char kEnableTouchEvents[]; UI_EXPORT extern const char kEnableViewsTextfield[]; -UI_EXPORT extern const char kEnableWebkitTextSubpixelPositioning[]; UI_EXPORT extern const char kForceDeviceScaleFactor[]; UI_EXPORT extern const char kHighlightMissingScaledResources[]; UI_EXPORT extern const char kLang[]; diff --git a/ui/gfx/font_render_params_linux.cc b/ui/gfx/font_render_params_linux.cc index 2b32c7b..3e3e92a 100644 --- a/ui/gfx/font_render_params_linux.cc +++ b/ui/gfx/font_render_params_linux.cc @@ -11,7 +11,7 @@ #else #include <fontconfig/fontconfig.h> #include "base/command_line.h" -#include "ui/base/ui_base_switches.h" +#include "ui/gfx/switches.h" #endif namespace gfx { diff --git a/ui/gfx/image/image_skia_operations.cc b/ui/gfx/image/image_skia_operations.cc index 75848c3..878d9d2 100644 --- a/ui/gfx/image/image_skia_operations.cc +++ b/ui/gfx/image/image_skia_operations.cc @@ -9,7 +9,6 @@ #include "skia/ext/image_operations.h" #include "skia/ext/platform_canvas.h" #include "ui/base/layout.h" -#include "ui/base/ui_base_switches.h" #include "ui/gfx/canvas.h" #include "ui/gfx/image/canvas_image_source.h" #include "ui/gfx/image/image_skia.h" @@ -22,6 +21,7 @@ #include "ui/gfx/size_conversions.h" #include "ui/gfx/skbitmap_operations.h" #include "ui/gfx/skia_util.h" +#include "ui/gfx/switches.h" namespace gfx { namespace { diff --git a/ui/gfx/switches.cc b/ui/gfx/switches.cc new file mode 100644 index 0000000..f25ea9b --- /dev/null +++ b/ui/gfx/switches.cc @@ -0,0 +1,26 @@ +// Copyright 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#include "ui/gfx/switches.h" + +namespace gfx { +namespace switches { + +// Whether or not ImageSkiaOperations methods can scale one of images +// if they don't have the same scale factor. +const char kDisableScalingInImageSkiaOperations[] = + "disable-scaling-in-image-skia-operations"; + +// Let text glyphs have X-positions that aren't snapped to the pixel grid in +// the browser UI. +const char kEnableBrowserTextSubpixelPositioning[] = + "enable-browser-text-subpixel-positioning"; + +// Enable text glyphs to have X-positions that aren't snapped to the pixel grid +// in webkit renderers. +const char kEnableWebkitTextSubpixelPositioning[] = + "enable-webkit-text-subpixel-positioning"; + +} // namespace switches +} // namespace gfx diff --git a/ui/gfx/switches.h b/ui/gfx/switches.h new file mode 100644 index 0000000..12f4efe --- /dev/null +++ b/ui/gfx/switches.h @@ -0,0 +1,20 @@ +// Copyright 2012 The Chromium Authors. All rights reserved. +// Use of this source code is governed by a BSD-style license that can be +// found in the LICENSE file. + +#ifndef UI_GFX_SWITCHES_H_ +#define UI_GFX_SWITCHES_H_ + +#include "ui/base/ui_export.h" + +namespace gfx { +namespace switches { + +UI_EXPORT extern const char kDisableScalingInImageSkiaOperations[]; +UI_EXPORT extern const char kEnableBrowserTextSubpixelPositioning[]; +UI_EXPORT extern const char kEnableWebkitTextSubpixelPositioning[]; + +} // namespace switches +} // namespace gfx + +#endif // UI_GFX_SWITCHES_H_ @@ -509,6 +509,8 @@ 'gfx/skia_util.h', 'gfx/skia_utils_gtk.cc', 'gfx/skia_utils_gtk.h', + 'gfx/switches.cc', + 'gfx/switches.h', 'gfx/sys_color_change_listener.cc', 'gfx/sys_color_change_listener.h', 'gfx/text_constants.h', |