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/display/display_configuration_controller.h" | 9 #include "ash/display/display_configuration_controller.h" |
10 #include "ash/display/resolution_notification_controller.h" | 10 #include "ash/display/resolution_notification_controller.h" |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
489 if (info.overscan) { | 489 if (info.overscan) { |
490 display_manager->SetOverscanInsets( | 490 display_manager->SetOverscanInsets( |
491 display_id, gfx::Insets(info.overscan->top, info.overscan->left, | 491 display_id, gfx::Insets(info.overscan->top, info.overscan->left, |
492 info.overscan->bottom, info.overscan->right)); | 492 info.overscan->bottom, info.overscan->right)); |
493 } | 493 } |
494 | 494 |
495 // Process 'rotation' parameter. | 495 // Process 'rotation' parameter. |
496 if (info.rotation) { | 496 if (info.rotation) { |
497 display_configuration_controller->SetDisplayRotation( | 497 display_configuration_controller->SetDisplayRotation( |
498 display_id, DegreesToRotation(*info.rotation), | 498 display_id, DegreesToRotation(*info.rotation), |
499 display::Display::ROTATION_SOURCE_ACTIVE, true /* user_action */); | 499 display::Display::ROTATION_SOURCE_ACTIVE); |
500 } | 500 } |
501 | 501 |
502 // Process new display origin parameters. | 502 // Process new display origin parameters. |
503 gfx::Point new_bounds_origin = target.bounds().origin(); | 503 gfx::Point new_bounds_origin = target.bounds().origin(); |
504 if (info.bounds_origin_x) | 504 if (info.bounds_origin_x) |
505 new_bounds_origin.set_x(*info.bounds_origin_x); | 505 new_bounds_origin.set_x(*info.bounds_origin_x); |
506 if (info.bounds_origin_y) | 506 if (info.bounds_origin_y) |
507 new_bounds_origin.set_y(*info.bounds_origin_y); | 507 new_bounds_origin.set_y(*info.bounds_origin_y); |
508 | 508 |
509 if (new_bounds_origin != target.bounds().origin()) { | 509 if (new_bounds_origin != target.bounds().origin()) { |
(...skipping 374 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
884 touch_calibrator_.reset(new chromeos::TouchCalibratorController); | 884 touch_calibrator_.reset(new chromeos::TouchCalibratorController); |
885 return touch_calibrator_.get(); | 885 return touch_calibrator_.get(); |
886 } | 886 } |
887 | 887 |
888 // static | 888 // static |
889 DisplayInfoProvider* DisplayInfoProvider::Create() { | 889 DisplayInfoProvider* DisplayInfoProvider::Create() { |
890 return new DisplayInfoProviderChromeOS(); | 890 return new DisplayInfoProviderChromeOS(); |
891 } | 891 } |
892 | 892 |
893 } // namespace extensions | 893 } // namespace extensions |
OLD | NEW |