| Index: chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
|
| diff --git a/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc b/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
|
| index c106dfc88db60e4a0f25112dca8b50af02e65d21..3c6040573153dba76ae1a435b0289ab560998fff 100644
|
| --- a/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
|
| +++ b/chrome/browser/ui/webui/options2/chromeos/display_options_handler.cc
|
| @@ -120,10 +120,12 @@ void DisplayOptionsHandler::SendDisplayInfo() {
|
| PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
|
| base::FundamentalValue layout(
|
| pref_service->GetInteger(prefs::kSecondaryDisplayLayout));
|
| + base::FundamentalValue offset(
|
| + pref_service->GetInteger(prefs::kSecondaryDisplayOffset));
|
|
|
| web_ui()->CallJavascriptFunction(
|
| "options.DisplayOptions.setDisplayInfo",
|
| - mirroring, displays, layout);
|
| + mirroring, displays, layout, offset);
|
| }
|
|
|
| void DisplayOptionsHandler::FadeOutForMirroringFinished(bool is_mirroring) {
|
| @@ -136,9 +138,11 @@ void DisplayOptionsHandler::FadeOutForMirroringFinished(bool is_mirroring) {
|
| // Not necessary to start fade-in animation. OutputConfigurator will do that.
|
| }
|
|
|
| -void DisplayOptionsHandler::FadeOutForDisplayLayoutFinished(int layout) {
|
| +void DisplayOptionsHandler::FadeOutForDisplayLayoutFinished(
|
| + int layout, int offset) {
|
| PrefService* pref_service = Profile::FromWebUI(web_ui())->GetPrefs();
|
| pref_service->SetInteger(prefs::kSecondaryDisplayLayout, layout);
|
| + pref_service->SetInteger(prefs::kSecondaryDisplayOffset, offset);
|
| SendDisplayInfo();
|
| ash::Shell::GetInstance()->output_configurator_animation()->
|
| StartFadeInAnimation();
|
| @@ -162,7 +166,8 @@ void DisplayOptionsHandler::HandleMirroring(const base::ListValue* args) {
|
|
|
| void DisplayOptionsHandler::HandleDisplayLayout(const base::ListValue* args) {
|
| double layout = -1;
|
| - if (!args->GetDouble(0, &layout)) {
|
| + double offset = -1;
|
| + if (!args->GetDouble(0, &layout) || !args->GetDouble(1, &offset)) {
|
| LOG(ERROR) << "Invalid parameter";
|
| return;
|
| }
|
| @@ -172,7 +177,8 @@ void DisplayOptionsHandler::HandleDisplayLayout(const base::ListValue* args) {
|
| StartFadeOutAnimation(base::Bind(
|
| &DisplayOptionsHandler::FadeOutForDisplayLayoutFinished,
|
| base::Unretained(this),
|
| - static_cast<int>(layout)));
|
| + static_cast<int>(layout),
|
| + static_cast<int>(offset)));
|
| }
|
|
|
| } // namespace options2
|
|
|