Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/webui/options/chromeos/display_options_handler.h" | 5 #include "chrome/browser/ui/webui/options/chromeos/display_options_handler.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 #include <stdint.h> | 8 #include <stdint.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 340 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 351 if (profile_name.empty()) | 351 if (profile_name.empty()) |
| 352 continue; | 352 continue; |
| 353 auto color_profile_dict = base::MakeUnique<base::DictionaryValue>(); | 353 auto color_profile_dict = base::MakeUnique<base::DictionaryValue>(); |
| 354 color_profile_dict->SetInteger("profileId", color_profile); | 354 color_profile_dict->SetInteger("profileId", color_profile); |
| 355 color_profile_dict->SetString("name", profile_name); | 355 color_profile_dict->SetString("name", profile_name); |
| 356 available_color_profiles->Append(std::move(color_profile_dict)); | 356 available_color_profiles->Append(std::move(color_profile_dict)); |
| 357 } | 357 } |
| 358 js_display->Set("availableColorProfiles", available_color_profiles); | 358 js_display->Set("availableColorProfiles", available_color_profiles); |
| 359 | 359 |
| 360 if (display_manager->GetNumDisplays() > 1) { | 360 if (display_manager->GetNumDisplays() > 1) { |
| 361 // The settings UI must use the resolved display layout to show the | |
| 362 // actual applied layout. | |
| 361 const display::DisplayPlacement placement = | 363 const display::DisplayPlacement placement = |
| 362 display_manager->GetCurrentDisplayLayout().FindPlacementById( | 364 display_manager->GetCurrentResolvedDisplayLayout().FindPlacementById( |
|
stevenjb
2017/01/31 21:58:56
We need to make a similar change to display_info_p
afakhry
2017/01/31 23:23:43
Done.
| |
| 363 display.id()); | 365 display.id()); |
| 364 if (placement.display_id != display::kInvalidDisplayId) { | 366 if (placement.display_id != display::kInvalidDisplayId) { |
| 365 js_display->SetString( | 367 js_display->SetString( |
| 366 "parentId", base::Int64ToString(placement.parent_display_id)); | 368 "parentId", base::Int64ToString(placement.parent_display_id)); |
| 367 js_display->SetInteger("layoutType", placement.position); | 369 js_display->SetInteger("layoutType", placement.position); |
| 368 js_display->SetInteger("offset", placement.offset); | 370 js_display->SetInteger("offset", placement.offset); |
| 369 } | 371 } |
| 370 } | 372 } |
| 371 | 373 |
| 372 js_displays->Append(std::move(js_display)); | 374 js_displays->Append(std::move(js_display)); |
| (...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 579 if (!args->GetBoolean(0, &enable)) | 581 if (!args->GetBoolean(0, &enable)) |
| 580 NOTREACHED(); | 582 NOTREACHED(); |
| 581 | 583 |
| 582 GetDisplayManager()->SetDefaultMultiDisplayModeForCurrentDisplays( | 584 GetDisplayManager()->SetDefaultMultiDisplayModeForCurrentDisplays( |
| 583 enable ? display::DisplayManager::UNIFIED | 585 enable ? display::DisplayManager::UNIFIED |
| 584 : display::DisplayManager::EXTENDED); | 586 : display::DisplayManager::EXTENDED); |
| 585 } | 587 } |
| 586 | 588 |
| 587 } // namespace options | 589 } // namespace options |
| 588 } // namespace chromeos | 590 } // namespace chromeos |
| OLD | NEW |