| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/extensions/display_info_provider_chromeos.h" | 5 #include "chrome/browser/extensions/display_info_provider_chromeos.h" |
| 6 | 6 |
| 7 #include <stdint.h> | 7 #include <stdint.h> |
| 8 | 8 |
| 9 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" | 9 #include "ash/common/wm/maximize_mode/maximize_mode_controller.h" |
| 10 #include "ash/display/display_configuration_controller.h" | 10 #include "ash/display/display_configuration_controller.h" |
| (...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 460 return false; | 460 return false; |
| 461 } | 461 } |
| 462 display::DisplayManager* display_manager = | 462 display::DisplayManager* display_manager = |
| 463 ash::Shell::GetInstance()->display_manager(); | 463 ash::Shell::GetInstance()->display_manager(); |
| 464 ash::DisplayConfigurationController* display_configuration_controller = | 464 ash::DisplayConfigurationController* display_configuration_controller = |
| 465 ash::Shell::GetInstance()->display_configuration_controller(); | 465 ash::Shell::GetInstance()->display_configuration_controller(); |
| 466 | 466 |
| 467 const display::Display target = GetDisplay(display_id_str); | 467 const display::Display target = GetDisplay(display_id_str); |
| 468 | 468 |
| 469 if (target.id() == display::kInvalidDisplayId) { | 469 if (target.id() == display::kInvalidDisplayId) { |
| 470 *error = "Display not found."; | 470 *error = "Display not found:" + display_id_str; |
| 471 return false; | 471 return false; |
| 472 } | 472 } |
| 473 | 473 |
| 474 int64_t display_id = target.id(); | 474 int64_t display_id = target.id(); |
| 475 const display::Display& primary = | 475 const display::Display& primary = |
| 476 display::Screen::GetScreen()->GetPrimaryDisplay(); | 476 display::Screen::GetScreen()->GetPrimaryDisplay(); |
| 477 | 477 |
| 478 if (!ValidateParamsForDisplay(info, target, display_manager, primary.id(), | 478 if (!ValidateParamsForDisplay(info, target, display_manager, primary.id(), |
| 479 error)) { | 479 error)) { |
| 480 return false; | 480 return false; |
| (...skipping 415 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 896 touch_calibrator_.reset(new chromeos::TouchCalibratorController); | 896 touch_calibrator_.reset(new chromeos::TouchCalibratorController); |
| 897 return touch_calibrator_.get(); | 897 return touch_calibrator_.get(); |
| 898 } | 898 } |
| 899 | 899 |
| 900 // static | 900 // static |
| 901 DisplayInfoProvider* DisplayInfoProvider::Create() { | 901 DisplayInfoProvider* DisplayInfoProvider::Create() { |
| 902 return new DisplayInfoProviderChromeOS(); | 902 return new DisplayInfoProviderChromeOS(); |
| 903 } | 903 } |
| 904 | 904 |
| 905 } // namespace extensions | 905 } // namespace extensions |
| OLD | NEW |