diff options
6 files changed, 32 insertions, 103 deletions
diff --git a/chrome/app/generated_resources.grd b/chrome/app/generated_resources.grd index 16becb9..e4f9e67 100644 --- a/chrome/app/generated_resources.grd +++ b/chrome/app/generated_resources.grd @@ -12280,18 +12280,30 @@ Some features may be unavailable. Please check that the profile exists and you <message name="IDS_OPTIONS_DEVICE_GROUP_NAME"> Device </message> + <message name="IDS_OPTIONS_DEVICE_GROUP_DESCRIPTION"> + Change settings specific to your device and peripherals. + </message> <message name="IDS_OPTIONS_DEVICE_GROUP_KEYBOARD_SECTION"> Keyboard: </message> <message name="IDS_OPTIONS_DEVICE_GROUP_KEYBOARD_SETTINGS_BUTTON_TITLE"> Keyboard settings... </message> + <message name="IDS_OPTIONS2_DEVICE_GROUP_KEYBOARD_SETTINGS_BUTTON_TITLE"> + Keyboard settings + </message> <message name="IDS_OPTIONS_DEVICE_GROUP_POINTER_SECTION"> Pointer sensitivity: </message> + <message name="IDS_OPTIONS2_DEVICE_GROUP_POINTER_SECTION"> + Pointer speed: + </message> <message name="IDS_OPTIONS_DEVICE_GROUP_POINTER_SETTINGS_BUTTON_TITLE"> Pointer settings... </message> + <message name="IDS_OPTIONS2_DEVICE_GROUP_POINTER_SETTINGS_BUTTON_TITLE"> + Pointer settings + </message> <message name="IDS_OPTIONS_SETTINGS_SECTION_TITLE_TOUCHPAD"> Touchpad </message> diff --git a/chrome/browser/resources/options2/browser_options.css b/chrome/browser/resources/options2/browser_options.css index a9f35c9..30cf6dd 100644 --- a/chrome/browser/resources/options2/browser_options.css +++ b/chrome/browser/resources/options2/browser_options.css @@ -100,18 +100,8 @@ html[dir=rtl] #account-picture-wrapper { margin-top: 10px; } -#pointer-sensitivity-more { - float: right; -} - -html[dir=rtl] #pointer-sensitivity-more { - float: left; -} - -#pointer-value, -#slider-control { - display: inline-block; - vertical-align: top; +input[type='range'] { + vertical-align: middle; } /* Internet settings */ diff --git a/chrome/browser/resources/options2/browser_options.html b/chrome/browser/resources/options2/browser_options.html index 26c512d..ded931f 100644 --- a/chrome/browser/resources/options2/browser_options.html +++ b/chrome/browser/resources/options2/browser_options.html @@ -130,37 +130,21 @@ <if expr="pp_ifdef('chromeos')"> <section> <h3 i18n-content="sectionTitleDevice"></h3> - <div class="option-control-table"> - <span class="option-name" i18n-content="deviceGroupPointer"></span> - <div id="pointer-value"> - <div id="slider-control"> - <input id="sensitivity-range" type="range" min="1" max="5" - pref="settings.touchpad.sensitivity2" class="touch-slider"> - <div> - <span i18n-content="pointerSensitivityLess"></span> - <span id="pointer-sensitivity-more" - i18n-content="pointerSensitivityMore"></span> - </div> - </div> - </div> - <button id="pointer-settings-button" - i18n-content="pointerSettingsButtonTitle" hidden> - </button> - </div> <div> - <span i18n-content="deviceGroupKeyboard"></span> - <button id="keyboard-settings-button" - i18n-content="keyboardSettingsButtonTitle"> - </button> - </div> - <div id="brightness-value"> - <span i18n-content="deviceGroupBrightness"></span> - <button id="brightness-decrease-button" - i18n-content="brightnessDecrease"> - </button> - <button id="brightness-increase-button" - i18n-content="brightnessIncrease"> - </button> + <span i18n-content="deviceGroupDescription"></span> + <div class="settings-row"> + <span class="option-name" i18n-content="deviceGroupPointer"></span> + <input id="sensitivity-range" type="range" min="1" max="5" + pref="settings.touchpad.sensitivity2" class="touch-slider"> + </div> + <div class="settings-row"> + <button id="pointer-settings-button" + i18n-content="pointerSettingsButtonTitle"> + </button> + <button id="keyboard-settings-button" + i18n-content="keyboardSettingsButtonTitle"> + </button> + </div> </div> </section> </if> diff --git a/chrome/browser/resources/options2/browser_options.js b/chrome/browser/resources/options2/browser_options.js index 018484c..7d395f3 100644 --- a/chrome/browser/resources/options2/browser_options.js +++ b/chrome/browser/resources/options2/browser_options.js @@ -122,10 +122,6 @@ cr.define('options', function() { $('pointer-settings-button').onclick = function(evt) { OptionsPage.navigateToPage('pointer-overlay'); }; - this.initBrightnessButton_('brightness-decrease-button', - 'decreaseScreenBrightness'); - this.initBrightnessButton_('brightness-increase-button', - 'increaseScreenBrightness'); } // Search section. @@ -490,20 +486,6 @@ cr.define('options', function() { }, /** - * Initializes a button for controlling screen brightness. - * @param {string} id Button ID. - * @param {string} callback Name of the callback function. - */ - initBrightnessButton_: function(id, callback) { - var button = $(id); - cr.ui.decorate(button, RepeatingButton); - button.repeatInterval = 300; - button.addEventListener(RepeatingButton.Event.BUTTON_HELD, function(e) { - chrome.send(callback); - }); - }, - - /** * Updates the sync section with the given state. * @param {Object} syncData A bunch of data records that describe the status * of the sync system. diff --git a/chrome/browser/ui/webui/options2/browser_options_handler2.cc b/chrome/browser/ui/webui/options2/browser_options_handler2.cc index d1bddc0..7f0d5cf 100644 --- a/chrome/browser/ui/webui/options2/browser_options_handler2.cc +++ b/chrome/browser/ui/webui/options2/browser_options_handler2.cc @@ -84,8 +84,6 @@ #if defined(OS_CHROMEOS) #include "chrome/browser/chromeos/accessibility/accessibility_util.h" #include "chrome/browser/chromeos/cros_settings.h" -#include "chrome/browser/chromeos/dbus/dbus_thread_manager.h" -#include "chrome/browser/chromeos/dbus/power_manager_client.h" #include "chrome/browser/chromeos/login/user_manager.h" #include "chrome/browser/chromeos/options/take_photo_dialog.h" #include "chrome/browser/ui/browser_window.h" @@ -283,24 +281,17 @@ void BrowserOptionsHandler::GetLocalizedValues( IDS_OPTIONS_SETTINGS_SECTION_TITLE_ACCESSIBILITY }, { "accessibilityVirtualKeyboard", IDS_OPTIONS_SETTINGS_ACCESSIBILITY_VIRTUAL_KEYBOARD_DESCRIPTION }, - { "brightnessDecrease", IDS_OPTIONS_SETTINGS_BRIGHTNESS_DECREASE }, - { "brightnessIncrease", IDS_OPTIONS_SETTINGS_BRIGHTNESS_INCREASE }, { "changePicture", IDS_OPTIONS_CHANGE_PICTURE_CAPTION }, { "datetimeTitle", IDS_OPTIONS_SETTINGS_SECTION_TITLE_DATETIME }, - { "deviceGroupBrightness", IDS_OPTIONS_SETTINGS_BRIGHTNESS_DESCRIPTION }, - { "deviceGroupKeyboard", IDS_OPTIONS_DEVICE_GROUP_KEYBOARD_SECTION }, - { "deviceGroupPointer", IDS_OPTIONS_DEVICE_GROUP_POINTER_SECTION }, + { "deviceGroupDescription", IDS_OPTIONS_DEVICE_GROUP_DESCRIPTION }, + { "deviceGroupPointer", IDS_OPTIONS2_DEVICE_GROUP_POINTER_SECTION }, { "enableScreenlock", IDS_OPTIONS_ENABLE_SCREENLOCKER_CHECKBOX }, { "internetOptionsButtonTitle", IDS_OPTIONS_INTERNET_OPTIONS_BUTTON_TITLE }, { "keyboardSettingsButtonTitle", - IDS_OPTIONS_DEVICE_GROUP_KEYBOARD_SETTINGS_BUTTON_TITLE }, + IDS_OPTIONS2_DEVICE_GROUP_KEYBOARD_SETTINGS_BUTTON_TITLE }, { "manageAccountsButtonTitle", IDS_OPTIONS_ACCOUNTS_BUTTON_TITLE }, - { "pointerSensitivityLess", - IDS_OPTIONS_SETTINGS_SENSITIVITY_LESS_DESCRIPTION }, - { "pointerSensitivityMore", - IDS_OPTIONS_SETTINGS_SENSITIVITY_MORE_DESCRIPTION }, { "pointerSettingsButtonTitle", - IDS_OPTIONS_DEVICE_GROUP_POINTER_SETTINGS_BUTTON_TITLE }, + IDS_OPTIONS2_DEVICE_GROUP_POINTER_SETTINGS_BUTTON_TITLE }, { "sectionTitleDevice", IDS_OPTIONS_DEVICE_GROUP_NAME }, { "sectionTitleInternet", IDS_OPTIONS_INTERNET_OPTIONS_GROUP_LABEL }, { "timezone", IDS_OPTIONS_SETTINGS_TIMEZONE_DESCRIPTION }, @@ -469,16 +460,6 @@ void BrowserOptionsHandler::RegisterMessages() { base::Bind(&BrowserOptionsHandler::ThemesSetGTK, base::Unretained(this))); #endif -#if defined(OS_CHROMEOS) - web_ui()->RegisterMessageCallback( - "decreaseScreenBrightness", - base::Bind(&BrowserOptionsHandler::DecreaseScreenBrightnessCallback, - base::Unretained(this))); - web_ui()->RegisterMessageCallback( - "increaseScreenBrightness", - base::Bind(&BrowserOptionsHandler::IncreaseScreenBrightnessCallback, - base::Unretained(this))); -#endif web_ui()->RegisterMessageCallback( "selectDownloadLocation", base::Bind(&BrowserOptionsHandler::HandleSelectDownloadLocation, @@ -1051,20 +1032,6 @@ void BrowserOptionsHandler::UpdateAccountPicture() { email_value); } } - -void BrowserOptionsHandler::DecreaseScreenBrightnessCallback( - const ListValue* args) { - // Do not allow the options button to turn off the backlight, as that - // can make it very difficult to see the increase brightness button. - chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> - DecreaseScreenBrightness(false); -} - -void BrowserOptionsHandler::IncreaseScreenBrightnessCallback( - const ListValue* args) { - chromeos::DBusThreadManager::Get()->GetPowerManagerClient()-> - IncreaseScreenBrightness(); -} #endif DictionaryValue* BrowserOptionsHandler::GetSyncStateDictionary() { diff --git a/chrome/browser/ui/webui/options2/browser_options_handler2.h b/chrome/browser/ui/webui/options2/browser_options_handler2.h index 78f3908..b8a150e 100644 --- a/chrome/browser/ui/webui/options2/browser_options_handler2.h +++ b/chrome/browser/ui/webui/options2/browser_options_handler2.h @@ -144,12 +144,6 @@ class BrowserOptionsHandler #endif #if defined(OS_CHROMEOS) - // Called when the System configuration screen is used to adjust - // the screen brightness. - // |args| will be an empty list. - void DecreaseScreenBrightnessCallback(const base::ListValue* args); - void IncreaseScreenBrightnessCallback(const base::ListValue* args); - void UpdateAccountPicture(); #endif |