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

Side by Side Diff: ash/display/display_manager.cc

Issue 574033003: Remove keyboard usability mode (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Compile error and unneccessary headers Created 6 years, 3 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 | « ash/display/display_manager.h ('k') | ash/display/virtual_keyboard_window_controller.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 "ash/display/display_manager.h" 5 #include "ash/display/display_manager.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 417 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 iter != displays_.end(); ++iter) { 428 iter != displays_.end(); ++iter) {
429 DisplayInfo info = GetDisplayInfo(iter->id()); 429 DisplayInfo info = GetDisplayInfo(iter->id());
430 if (info.id() == display_id) { 430 if (info.id() == display_id) {
431 if (info.rotation() == rotation) 431 if (info.rotation() == rotation)
432 return; 432 return;
433 info.set_rotation(rotation); 433 info.set_rotation(rotation);
434 } 434 }
435 display_info_list.push_back(info); 435 display_info_list.push_back(info);
436 } 436 }
437 AddMirrorDisplayInfoIfAny(&display_info_list); 437 AddMirrorDisplayInfoIfAny(&display_info_list);
438 if (virtual_keyboard_root_window_enabled() &&
439 display_id == non_desktop_display_.id()) {
440 DisplayInfo info = GetDisplayInfo(display_id);
441 info.set_rotation(rotation);
442 display_info_list.push_back(info);
443 }
444 UpdateDisplays(display_info_list); 438 UpdateDisplays(display_info_list);
445 } 439 }
446 440
447 void DisplayManager::SetDisplayUIScale(int64 display_id, 441 void DisplayManager::SetDisplayUIScale(int64 display_id,
448 float ui_scale) { 442 float ui_scale) {
449 if (!IsDisplayUIScalingEnabled() || 443 if (!IsDisplayUIScalingEnabled() ||
450 gfx::Display::InternalDisplayId() != display_id) { 444 gfx::Display::InternalDisplayId() != display_id) {
451 return; 445 return;
452 } 446 }
453 447
(...skipping 617 matching lines...) Expand 10 before | Expand all | Expand 10 after
1071 display_info.set_device_scale_factor( 1065 display_info.set_device_scale_factor(
1072 display_info.device_scale_factor() == 1.0f ? 2.0f : 1.0f); 1066 display_info.device_scale_factor() == 1.0f ? 2.0f : 1.0f);
1073 new_display_info_list.push_back(display_info); 1067 new_display_info_list.push_back(display_info);
1074 } 1068 }
1075 AddMirrorDisplayInfoIfAny(&new_display_info_list); 1069 AddMirrorDisplayInfoIfAny(&new_display_info_list);
1076 UpdateDisplays(new_display_info_list); 1070 UpdateDisplays(new_display_info_list);
1077 } 1071 }
1078 1072
1079 #if defined(OS_CHROMEOS) 1073 #if defined(OS_CHROMEOS)
1080 void DisplayManager::SetSoftwareMirroring(bool enabled) { 1074 void DisplayManager::SetSoftwareMirroring(bool enabled) {
1081 // TODO(oshima|bshe): Support external display on the system
1082 // that has virtual keyboard display.
1083 if (second_display_mode_ == VIRTUAL_KEYBOARD)
1084 return;
1085 SetSecondDisplayMode(enabled ? MIRRORING : EXTENDED); 1075 SetSecondDisplayMode(enabled ? MIRRORING : EXTENDED);
1086 } 1076 }
1087 1077
1088 bool DisplayManager::SoftwareMirroringEnabled() const { 1078 bool DisplayManager::SoftwareMirroringEnabled() const {
1089 return software_mirroring_enabled(); 1079 return software_mirroring_enabled();
1090 } 1080 }
1091 #endif 1081 #endif
1092 1082
1093 void DisplayManager::SetSecondDisplayMode(SecondDisplayMode mode) { 1083 void DisplayManager::SetSecondDisplayMode(SecondDisplayMode mode) {
1094 second_display_mode_ = mode; 1084 second_display_mode_ = mode;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1268 new_secondary_origin.Offset(-secondary_bounds.width(), offset); 1258 new_secondary_origin.Offset(-secondary_bounds.width(), offset);
1269 break; 1259 break;
1270 } 1260 }
1271 gfx::Insets insets = secondary_display->GetWorkAreaInsets(); 1261 gfx::Insets insets = secondary_display->GetWorkAreaInsets();
1272 secondary_display->set_bounds( 1262 secondary_display->set_bounds(
1273 gfx::Rect(new_secondary_origin, secondary_bounds.size())); 1263 gfx::Rect(new_secondary_origin, secondary_bounds.size()));
1274 secondary_display->UpdateWorkAreaFromInsets(insets); 1264 secondary_display->UpdateWorkAreaFromInsets(insets);
1275 } 1265 }
1276 1266
1277 } // namespace ash 1267 } // namespace ash
OLDNEW
« no previous file with comments | « ash/display/display_manager.h ('k') | ash/display/virtual_keyboard_window_controller.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698