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

Side by Side Diff: chrome/browser/ui/webui/options/chromeos/display_options_handler.cc

Issue 2720913003: Calls display_configuration_controller to rotate screen in accelerator_controller_delegate_aura (Closed)
Patch Set: Last patch for commit Created 3 years, 9 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
OLDNEW
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 <memory> 10 #include <memory>
(...skipping 520 matching lines...) Expand 10 before | Expand all | Expand 10 after
531 else if (rotation_value == 180) 531 else if (rotation_value == 180)
532 new_rotation = display::Display::ROTATE_180; 532 new_rotation = display::Display::ROTATE_180;
533 else if (rotation_value == 270) 533 else if (rotation_value == 270)
534 new_rotation = display::Display::ROTATE_270; 534 new_rotation = display::Display::ROTATE_270;
535 else if (rotation_value != 0) 535 else if (rotation_value != 0)
536 LOG(ERROR) << "Invalid rotation: " << rotation_value << " Falls back to 0"; 536 LOG(ERROR) << "Invalid rotation: " << rotation_value << " Falls back to 0";
537 537
538 content::RecordAction( 538 content::RecordAction(
539 base::UserMetricsAction("Options_DisplaySetOrientation")); 539 base::UserMetricsAction("Options_DisplaySetOrientation"));
540 GetDisplayConfigurationController()->SetDisplayRotation( 540 GetDisplayConfigurationController()->SetDisplayRotation(
541 display_id, new_rotation, display::Display::ROTATION_SOURCE_USER, 541 display_id, new_rotation, display::Display::ROTATION_SOURCE_USER);
542 true /* user_action */);
543 } 542 }
544 543
545 void DisplayOptionsHandler::HandleSetColorProfile(const base::ListValue* args) { 544 void DisplayOptionsHandler::HandleSetColorProfile(const base::ListValue* args) {
546 DCHECK(!args->empty()); 545 DCHECK(!args->empty());
547 int64_t display_id = GetDisplayIdFromArgs(args); 546 int64_t display_id = GetDisplayIdFromArgs(args);
548 if (display_id == display::kInvalidDisplayId) 547 if (display_id == display::kInvalidDisplayId)
549 return; 548 return;
550 549
551 std::string profile_value; 550 std::string profile_value;
552 if (!args->GetString(1, &profile_value)) { 551 if (!args->GetString(1, &profile_value)) {
(...skipping 28 matching lines...) Expand all
581 if (!args->GetBoolean(0, &enable)) 580 if (!args->GetBoolean(0, &enable))
582 NOTREACHED(); 581 NOTREACHED();
583 582
584 GetDisplayManager()->SetDefaultMultiDisplayModeForCurrentDisplays( 583 GetDisplayManager()->SetDefaultMultiDisplayModeForCurrentDisplays(
585 enable ? display::DisplayManager::UNIFIED 584 enable ? display::DisplayManager::UNIFIED
586 : display::DisplayManager::EXTENDED); 585 : display::DisplayManager::EXTENDED);
587 } 586 }
588 587
589 } // namespace options 588 } // namespace options
590 } // namespace chromeos 589 } // namespace chromeos
OLDNEW
« no previous file with comments | « chrome/browser/extensions/display_info_provider_chromeos.cc ('k') | tools/metrics/actions/actions.xml » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698