Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(466)

Side by Side Diff: chrome/browser/extensions/display_info_provider_chromeos.cc

Issue 2954343003: Sets the rotation source as USER when using the system display API (Closed)
Patch Set: Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698