| 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 <string> | 10 #include <string> |
| (...skipping 321 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 332 if (profile_name.empty()) | 332 if (profile_name.empty()) |
| 333 continue; | 333 continue; |
| 334 base::DictionaryValue* color_profile_dict = new base::DictionaryValue(); | 334 base::DictionaryValue* color_profile_dict = new base::DictionaryValue(); |
| 335 color_profile_dict->SetInteger("profileId", color_profile); | 335 color_profile_dict->SetInteger("profileId", color_profile); |
| 336 color_profile_dict->SetString("name", profile_name); | 336 color_profile_dict->SetString("name", profile_name); |
| 337 available_color_profiles->Append(color_profile_dict); | 337 available_color_profiles->Append(color_profile_dict); |
| 338 } | 338 } |
| 339 js_display->Set("availableColorProfiles", available_color_profiles); | 339 js_display->Set("availableColorProfiles", available_color_profiles); |
| 340 | 340 |
| 341 if (display_manager->GetNumDisplays() > 1) { | 341 if (display_manager->GetNumDisplays() > 1) { |
| 342 const ash::DisplayPlacement* placement = | 342 const ash::DisplayPlacement placement = |
| 343 display_manager->GetCurrentDisplayLayout().FindPlacementById( | 343 display_manager->GetCurrentDisplayLayout().FindPlacementById( |
| 344 display.id()); | 344 display.id()); |
| 345 if (placement) { | 345 if (placement.display_id != gfx::Display::kInvalidDisplayID) { |
| 346 js_display->SetString( | 346 js_display->SetString( |
| 347 "parentId", base::Int64ToString(placement->parent_display_id)); | 347 "parentId", base::Int64ToString(placement.parent_display_id)); |
| 348 js_display->SetInteger("layoutType", placement->position); | 348 js_display->SetInteger("layoutType", placement.position); |
| 349 js_display->SetInteger("offset", placement->offset); | 349 js_display->SetInteger("offset", placement.offset); |
| 350 } | 350 } |
| 351 } | 351 } |
| 352 | 352 |
| 353 js_displays->Append(js_display); | 353 js_displays->Append(js_display); |
| 354 } | 354 } |
| 355 | 355 |
| 356 web_ui()->CallJavascriptFunction("options.DisplayOptions.setDisplayInfo", | 356 web_ui()->CallJavascriptFunction("options.DisplayOptions.setDisplayInfo", |
| 357 mode, *js_displays); | 357 mode, *js_displays); |
| 358 } | 358 } |
| 359 | 359 |
| (...skipping 190 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 550 bool enable = false; | 550 bool enable = false; |
| 551 if (!args->GetBoolean(0, &enable)) | 551 if (!args->GetBoolean(0, &enable)) |
| 552 NOTREACHED(); | 552 NOTREACHED(); |
| 553 | 553 |
| 554 GetDisplayManager()->SetDefaultMultiDisplayModeForCurrentDisplays( | 554 GetDisplayManager()->SetDefaultMultiDisplayModeForCurrentDisplays( |
| 555 enable ? ash::DisplayManager::UNIFIED : ash::DisplayManager::EXTENDED); | 555 enable ? ash::DisplayManager::UNIFIED : ash::DisplayManager::EXTENDED); |
| 556 } | 556 } |
| 557 | 557 |
| 558 } // namespace options | 558 } // namespace options |
| 559 } // namespace chromeos | 559 } // namespace chromeos |
| OLD | NEW |