| 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 506 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 517 | 517 |
| 518 // Process 'rotation' parameter. | 518 // Process 'rotation' parameter. |
| 519 if (info.rotation) { | 519 if (info.rotation) { |
| 520 if (IsMaximizeModeWindowManagerEnabled() && | 520 if (IsMaximizeModeWindowManagerEnabled() && |
| 521 display_id == display::Display::InternalDisplayId()) { | 521 display_id == display::Display::InternalDisplayId()) { |
| 522 ash::Shell::Get()->screen_orientation_controller()->SetLockToRotation( | 522 ash::Shell::Get()->screen_orientation_controller()->SetLockToRotation( |
| 523 DegreesToRotation(*info.rotation)); | 523 DegreesToRotation(*info.rotation)); |
| 524 } else { | 524 } else { |
| 525 display_configuration_controller->SetDisplayRotation( | 525 display_configuration_controller->SetDisplayRotation( |
| 526 display_id, DegreesToRotation(*info.rotation), | 526 display_id, DegreesToRotation(*info.rotation), |
| 527 display::Display::ROTATION_SOURCE_ACTIVE); | 527 display::Display::ROTATION_SOURCE_USER); |
| 528 } | 528 } |
| 529 } | 529 } |
| 530 | 530 |
| 531 // Process new display origin parameters. | 531 // Process new display origin parameters. |
| 532 gfx::Point new_bounds_origin = target.bounds().origin(); | 532 gfx::Point new_bounds_origin = target.bounds().origin(); |
| 533 if (info.bounds_origin_x) | 533 if (info.bounds_origin_x) |
| 534 new_bounds_origin.set_x(*info.bounds_origin_x); | 534 new_bounds_origin.set_x(*info.bounds_origin_x); |
| 535 if (info.bounds_origin_y) | 535 if (info.bounds_origin_y) |
| 536 new_bounds_origin.set_y(*info.bounds_origin_y); | 536 new_bounds_origin.set_y(*info.bounds_origin_y); |
| 537 | 537 |
| (...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 919 touch_calibrator_.reset(new chromeos::TouchCalibratorController); | 919 touch_calibrator_.reset(new chromeos::TouchCalibratorController); |
| 920 return touch_calibrator_.get(); | 920 return touch_calibrator_.get(); |
| 921 } | 921 } |
| 922 | 922 |
| 923 // static | 923 // static |
| 924 DisplayInfoProvider* DisplayInfoProvider::Create() { | 924 DisplayInfoProvider* DisplayInfoProvider::Create() { |
| 925 return new DisplayInfoProviderChromeOS(); | 925 return new DisplayInfoProviderChromeOS(); |
| 926 } | 926 } |
| 927 | 927 |
| 928 } // namespace extensions | 928 } // namespace extensions |
| OLD | NEW |