summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 21:38:18 +0000
committerderat@chromium.org <derat@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-03-28 21:38:18 +0000
commit9d3af5584cdad5e699ab8f00728c78072e6c25ed (patch)
tree3a654c4074addefede3d0d98ff4c9ab99bf59236
parent2fb4914745320a7e168c0cb7045c3af72cef7e4a (diff)
downloadchromium_src-9d3af5584cdad5e699ab8f00728c78072e6c25ed.zip
chromium_src-9d3af5584cdad5e699ab8f00728c78072e6c25ed.tar.gz
chromium_src-9d3af5584cdad5e699ab8f00728c78072e6c25ed.tar.bz2
chromeos: Remove --ash-enable-brightness-control flag.
Enable the brightness keys unconditionally (i.e. also on systems that lack internal displays). BUG=chromium:315371 R=stevenjb@chromium.org Review URL: https://codereview.chromium.org/214643005 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@260287 0039d316-1c4b-4281-b951-d872f2087c98
-rw-r--r--ash/accelerators/accelerator_controller.cc8
-rw-r--r--ash/accelerators/accelerator_controller_unittest.cc25
-rw-r--r--ash/ash_switches.cc4
-rw-r--r--ash/ash_switches.h1
-rw-r--r--chrome/app/generated_resources.grd6
-rw-r--r--chrome/browser/about_flags.cc7
6 files changed, 1 insertions, 50 deletions
diff --git a/ash/accelerators/accelerator_controller.cc b/ash/accelerators/accelerator_controller.cc
index 7195004..9f1d2266 100644
--- a/ash/accelerators/accelerator_controller.cc
+++ b/ash/accelerators/accelerator_controller.cc
@@ -1140,13 +1140,7 @@ bool AcceleratorController::PerformAction(int action,
void AcceleratorController::SetBrightnessControlDelegate(
scoped_ptr<BrightnessControlDelegate> brightness_control_delegate) {
- // Install brightness control delegate only when internal
- // display exists.
- if (Shell::GetInstance()->display_manager()->HasInternalDisplay() ||
- CommandLine::ForCurrentProcess()->HasSwitch(
- switches::kAshEnableBrightnessControl)) {
- brightness_control_delegate_ = brightness_control_delegate.Pass();
- }
+ brightness_control_delegate_ = brightness_control_delegate.Pass();
}
void AcceleratorController::SetImeControlDelegate(
diff --git a/ash/accelerators/accelerator_controller_unittest.cc b/ash/accelerators/accelerator_controller_unittest.cc
index 80a2345..5be401a 100644
--- a/ash/accelerators/accelerator_controller_unittest.cc
+++ b/ash/accelerators/accelerator_controller_unittest.cc
@@ -754,18 +754,6 @@ TEST_F(AcceleratorControllerTest, GlobalAccelerators) {
const ui::Accelerator brightness_down(ui::VKEY_BRIGHTNESS_DOWN, ui::EF_NONE);
const ui::Accelerator brightness_up(ui::VKEY_BRIGHTNESS_UP, ui::EF_NONE);
{
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_FALSE(ProcessWithContext(brightness_up));
- DummyBrightnessControlDelegate* delegate =
- new DummyBrightnessControlDelegate(true);
- GetController()->SetBrightnessControlDelegate(
- scoped_ptr<BrightnessControlDelegate>(delegate).Pass());
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_FALSE(ProcessWithContext(brightness_up));
- }
- // Enable internal display.
- EnableInternalDisplay();
- {
DummyBrightnessControlDelegate* delegate =
new DummyBrightnessControlDelegate(false);
GetController()->SetBrightnessControlDelegate(
@@ -1167,19 +1155,6 @@ TEST_F(AcceleratorControllerTest, DisallowedAtModalWindow) {
const ui::Accelerator brightness_down(ui::VKEY_BRIGHTNESS_DOWN, ui::EF_NONE);
const ui::Accelerator brightness_up(ui::VKEY_BRIGHTNESS_UP, ui::EF_NONE);
{
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_FALSE(ProcessWithContext(brightness_up));
- DummyBrightnessControlDelegate* delegate =
- new DummyBrightnessControlDelegate(true);
- GetController()->SetBrightnessControlDelegate(
- scoped_ptr<BrightnessControlDelegate>(delegate).Pass());
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_FALSE(ProcessWithContext(brightness_up));
- }
- EnableInternalDisplay();
- {
- EXPECT_FALSE(ProcessWithContext(brightness_down));
- EXPECT_FALSE(ProcessWithContext(brightness_up));
DummyBrightnessControlDelegate* delegate =
new DummyBrightnessControlDelegate(false);
GetController()->SetBrightnessControlDelegate(
diff --git a/ash/ash_switches.cc b/ash/ash_switches.cc
index a96fafd..7c3146f 100644
--- a/ash/ash_switches.cc
+++ b/ash/ash_switches.cc
@@ -57,10 +57,6 @@ const char kAshDisableDockedWindows[] = "ash-disable-docked-windows";
const char kAshEnableAlternateFrameCaptionButtonStyle[] =
"ash-enable-alternate-caption-button";
-// Always enable brightness control. Used by machines that don't report their
-// main monitor as internal.
-const char kAshEnableBrightnessControl[] = "ash-enable-brightness-control";
-
#if defined(OS_CHROMEOS)
// Enables key bindings to scroll magnified screen.
const char kAshEnableMagnifierKeyScroller[] =
diff --git a/ash/ash_switches.h b/ash/ash_switches.h
index 80ab2db..829ee96 100644
--- a/ash/ash_switches.h
+++ b/ash/ash_switches.h
@@ -28,7 +28,6 @@ ASH_EXPORT extern const char kAshDisableAlternateFrameCaptionButtonStyle[];
ASH_EXPORT extern const char kAshDisableAlternateShelfLayout[];
ASH_EXPORT extern const char kAshDisableDockedWindows[];
ASH_EXPORT extern const char kAshEnableAlternateFrameCaptionButtonStyle[];
-ASH_EXPORT extern const char kAshEnableBrightnessControl[];
#if defined(OS_CHROMEOS)
ASH_EXPORT extern const char kAshEnableMagnifierKeyScroller[];
ASH_EXPORT extern const char kAshEnableMultiUserTray[];
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd
index dbdeb5c..42f6bc4 100644
--- a/chrome/app/generated_resources.grd
+++ b/chrome/app/generated_resources.grd
@@ -6337,12 +6337,6 @@ Keep your key file in a safe place. You will need it to create new versions of y
<message name="IDS_FLAGS_ASH_ENABLE_TOUCH_VIEW_TESTING_DESCRIPTION" desc="Description for the flag to enable the TouchView testing mode.">
Enable Ctrl+Alt+Shift+D to toggle the TouchView maximizing mode.
</message>
- <message name="IDS_FLAGS_ASH_ENABLE_BRIGHTNESS_CONTROL_NAME" desc="Title for the flag which can be used to enable brightness control of external displays.">
- Enable brightness control of external displays
- </message>
- <message name="IDS_FLAGS_ASH_ENABLE_BRIGHTNESS_CONTROL_DESCRIPTION" desc="Description for the flag to enable brightness control of external displays.">
- Make the brightness keys adjust external displays' brightness levels on devices that don't have internal displays.
- </message>
<message name="IDS_FLAGS_ENABLE_FULL_MULTI_PROFILE_MODE" desc="Title for the full multi profile mode flag.">
Enable side-by-side multi profile mode
</message>
diff --git a/chrome/browser/about_flags.cc b/chrome/browser/about_flags.cc
index 46dcdaa..8619626 100644
--- a/chrome/browser/about_flags.cc
+++ b/chrome/browser/about_flags.cc
@@ -1105,13 +1105,6 @@ const Experiment kExperiments[] = {
kOsCrOS,
SINGLE_VALUE_TYPE(ash::switches::kAshEnableTouchViewTesting),
},
- {
- "ash-enable-brightness-control",
- IDS_FLAGS_ASH_ENABLE_BRIGHTNESS_CONTROL_NAME,
- IDS_FLAGS_ASH_ENABLE_BRIGHTNESS_CONTROL_DESCRIPTION,
- kOsCrOS,
- SINGLE_VALUE_TYPE(ash::switches::kAshEnableBrightnessControl)
- },
#endif
#if defined(OS_CHROMEOS)
{