summaryrefslogtreecommitdiffstats
path: root/ui/native_theme
diff options
context:
space:
mode:
authoryefim@chromium.org <yefim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-11 23:34:19 +0000
committeryefim@chromium.org <yefim@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-11 23:34:19 +0000
commit5ed1d964d453ae38835af00ca47e44f39f631edb (patch)
treede9b85237fa3ff9292b4ab474e0e63e67f9ffd3b /ui/native_theme
parent081f290af9c5d0239e4034b7df6ba96a78edff9d (diff)
downloadchromium_src-5ed1d964d453ae38835af00ca47e44f39f631edb.zip
chromium_src-5ed1d964d453ae38835af00ca47e44f39f631edb.tar.gz
chromium_src-5ed1d964d453ae38835af00ca47e44f39f631edb.tar.bz2
Removed "disable-new-menu-style" command line switch and related code.
BUG=157692 Review URL: https://chromiumcodereview.appspot.com/13949002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@193801 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'ui/native_theme')
-rw-r--r--ui/native_theme/native_theme.cc23
-rw-r--r--ui/native_theme/native_theme.h2
-rw-r--r--ui/native_theme/native_theme_aura.cc2
-rw-r--r--ui/native_theme/native_theme_win.cc38
4 files changed, 18 insertions, 47 deletions
diff --git a/ui/native_theme/native_theme.cc b/ui/native_theme/native_theme.cc
index 1e9a90f..d31c4f0 100644
--- a/ui/native_theme/native_theme.cc
+++ b/ui/native_theme/native_theme.cc
@@ -6,11 +6,6 @@
#include "base/command_line.h"
#include "base/metrics/field_trial.h"
-#include "ui/base/ui_base_switches.h"
-
-// Constants for the new menu style field trial.
-const char kNewMenuStyleFieldTrialName[] = "NewMenuStyle";
-const char kNewMenuStyleFieldTrialGroupName[] = "OldStyle";
namespace ui {
@@ -25,24 +20,6 @@ void NativeTheme::SetScrollbarColors(unsigned inactive_color,
// NativeTheme::instance() is implemented in the platform specific source files,
// such as native_theme_win.cc or native_theme_linux.cc
-// static
-bool NativeTheme::IsNewMenuStyleEnabled() {
-#if defined(USE_AURA)
- return true;
-#else
- static bool enable_new_menu_style =
- !CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kDisableNewMenuStyle);
- // Run experiment only if there is no kDisableNewMenuStyle flag.
- if (enable_new_menu_style) {
- enable_new_menu_style =
- base::FieldTrialList::FindFullName(kNewMenuStyleFieldTrialName) !=
- kNewMenuStyleFieldTrialGroupName;
- }
- return enable_new_menu_style;
-#endif
-}
-
NativeTheme::NativeTheme()
: thumb_inactive_color_(0xeaeaea),
thumb_active_color_(0xf4f4f4),
diff --git a/ui/native_theme/native_theme.h b/ui/native_theme/native_theme.h
index d6ebc42..90df38f8 100644
--- a/ui/native_theme/native_theme.h
+++ b/ui/native_theme/native_theme.h
@@ -289,8 +289,6 @@ class NATIVE_THEME_EXPORT NativeTheme {
// function, returning the port's subclass.
static NativeTheme* instance();
- static bool IsNewMenuStyleEnabled();
-
protected:
NativeTheme();
virtual ~NativeTheme();
diff --git a/ui/native_theme/native_theme_aura.cc b/ui/native_theme/native_theme_aura.cc
index ed016e6..5ca518a 100644
--- a/ui/native_theme/native_theme_aura.cc
+++ b/ui/native_theme/native_theme_aura.cc
@@ -98,7 +98,7 @@ NativeThemeAura::~NativeThemeAura() {
SkColor NativeThemeAura::GetSystemColor(ColorId color_id) const {
// This implementation returns hardcoded colors.
SkColor color;
- if (IsNewMenuStyleEnabled() && CommonThemeGetSystemColor(color_id, &color))
+ if (CommonThemeGetSystemColor(color_id, &color))
return color;
switch (color_id) {
diff --git a/ui/native_theme/native_theme_win.cc b/ui/native_theme/native_theme_win.cc
index 62ab0ce..8863bcb 100644
--- a/ui/native_theme/native_theme_win.cc
+++ b/ui/native_theme/native_theme_win.cc
@@ -228,11 +228,9 @@ NativeThemeWin* NativeThemeWin::instance() {
gfx::Size NativeThemeWin::GetPartSize(Part part,
State state,
const ExtraParams& extra) const {
- if (IsNewMenuStyleEnabled()) {
- gfx::Size size = CommonThemeGetPartSize(part, state, extra);
- if (!size.IsEmpty())
- return size;
- }
+ gfx::Size part_size = CommonThemeGetPartSize(part, state, extra);
+ if (!part_size.IsEmpty())
+ return part_size;
// The GetThemePartSize call below returns the default size without
// accounting for user customization (crbug/218291).
@@ -288,21 +286,19 @@ void NativeThemeWin::Paint(SkCanvas* canvas,
if (rect.IsEmpty())
return;
- if (IsNewMenuStyleEnabled()) {
- switch (part) {
- case kMenuPopupGutter:
- CommonThemePaintMenuGutter(canvas, rect);
- return;
- case kMenuPopupSeparator:
- CommonThemePaintMenuSeparator(canvas, rect, extra.menu_separator);
- return;
- case kMenuPopupBackground:
- CommonThemePaintMenuBackground(canvas, rect);
- return;
- case kMenuItemBackground:
- CommonThemePaintMenuItemBackground(canvas, state, rect);
- return;
- }
+ switch (part) {
+ case kMenuPopupGutter:
+ CommonThemePaintMenuGutter(canvas, rect);
+ return;
+ case kMenuPopupSeparator:
+ CommonThemePaintMenuSeparator(canvas, rect, extra.menu_separator);
+ return;
+ case kMenuPopupBackground:
+ CommonThemePaintMenuBackground(canvas, rect);
+ return;
+ case kMenuItemBackground:
+ CommonThemePaintMenuItemBackground(canvas, state, rect);
+ return;
}
bool needs_paint_indirect = false;
@@ -493,7 +489,7 @@ void NativeThemeWin::PaintDirect(SkCanvas* canvas,
SkColor NativeThemeWin::GetSystemColor(ColorId color_id) const {
SkColor color;
- if (IsNewMenuStyleEnabled() && CommonThemeGetSystemColor(color_id, &color))
+ if (CommonThemeGetSystemColor(color_id, &color))
return color;
switch (color_id) {