r167592 - in trunk/src: chrome/browser chrome/browser/chromeos/login ui ui/base ui/gfx ui/gfx/image

3 views
Skip to first unread message

tfa...@chromium.org

unread,
Nov 13, 2012, 11:14:49 PM11/13/12
to chromium...@chromium.org
Author: tfa...@chromium.org
Date: Tue Nov 13 20:14:48 2012
New Revision: 167592

Log:
ui/gfx: Create a new gfx switches file to put gfx specific switches there.

BUG=103304
TEST=ui_unittests
R=s...@chromium.org


Review URL: https://chromiumcodereview.appspot.com/11359184

Added:
trunk/src/ui/gfx/switches.cc (contents, props changed)
trunk/src/ui/gfx/switches.h (contents, props changed)
Modified:
trunk/src/chrome/browser/about_flags.cc
trunk/src/chrome/browser/chromeos/login/login_utils.cc
trunk/src/ui/base/ui_base_switches.cc
trunk/src/ui/base/ui_base_switches.h
trunk/src/ui/gfx/font_render_params_linux.cc
trunk/src/ui/gfx/image/image_skia_operations.cc
trunk/src/ui/ui.gyp

Modified: trunk/src/chrome/browser/about_flags.cc
==============================================================================
--- trunk/src/chrome/browser/about_flags.cc (original)
+++ trunk/src/chrome/browser/about_flags.cc Tue Nov 13 20:14:48 2012
@@ -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 @@
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",

Modified: trunk/src/chrome/browser/chromeos/login/login_utils.cc
==============================================================================
--- trunk/src/chrome/browser/chromeos/login/login_utils.cc (original)
+++ trunk/src/chrome/browser/chromeos/login/login_utils.cc Tue Nov 13 20:14:48 2012
@@ -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 @@
::switches::kDisableOobeAnimation,
::switches::kDisableSeccompFilterSandbox,
::switches::kDisableSeccompSandbox,
- ::switches::kEnableBrowserTextSubpixelPositioning,
::switches::kEnableCompositingForFixedPosition,
::switches::kEnableEncryptedMedia,
::switches::kEnableGView,
@@ -768,7 +768,6 @@
::switches::kEnableSmoothScrolling,
::switches::kEnableThreadedCompositing,
::switches::kEnableViewport,
- ::switches::kEnableWebkitTextSubpixelPositioning,
::switches::kDisableThreadedCompositing,
::switches::kForceCompositingMode,
::switches::kGpuStartupDialog,
@@ -790,14 +789,6 @@
::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 @@
#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,

Modified: trunk/src/ui/base/ui_base_switches.cc
==============================================================================
--- trunk/src/ui/base/ui_base_switches.cc (original)
+++ trunk/src/ui/base/ui_base_switches.cc Tue Nov 13 20:14:48 2012
@@ -9,27 +9,12 @@
// 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";

Modified: trunk/src/ui/base/ui_base_switches.h
==============================================================================
--- trunk/src/ui/base/ui_base_switches.h (original)
+++ trunk/src/ui/base/ui_base_switches.h Tue Nov 13 20:14:48 2012
@@ -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[];

Modified: trunk/src/ui/gfx/font_render_params_linux.cc
==============================================================================
--- trunk/src/ui/gfx/font_render_params_linux.cc (original)
+++ trunk/src/ui/gfx/font_render_params_linux.cc Tue Nov 13 20:14:48 2012
@@ -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 {

Modified: trunk/src/ui/gfx/image/image_skia_operations.cc
==============================================================================
--- trunk/src/ui/gfx/image/image_skia_operations.cc (original)
+++ trunk/src/ui/gfx/image/image_skia_operations.cc Tue Nov 13 20:14:48 2012
@@ -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 {

Added: trunk/src/ui/gfx/switches.cc
==============================================================================
--- (empty file)
+++ trunk/src/ui/gfx/switches.cc Tue Nov 13 20:14:48 2012
@@ -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

Added: trunk/src/ui/gfx/switches.h
==============================================================================
--- (empty file)
+++ trunk/src/ui/gfx/switches.h Tue Nov 13 20:14:48 2012
@@ -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_

Modified: trunk/src/ui/ui.gyp
==============================================================================
--- trunk/src/ui/ui.gyp (original)
+++ trunk/src/ui/ui.gyp Tue Nov 13 20:14:48 2012
@@ -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',
Reply all
Reply to author
Forward
0 new messages