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 /ui | |
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
Diffstat (limited to 'ui')
-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 |
7 files changed, 50 insertions, 20 deletions
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', |