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

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: 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
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 608 matching lines...) Expand 10 before | Expand all | Expand 10 after
1062 display_info.set_device_scale_factor( 1056 display_info.set_device_scale_factor(
1063 display_info.device_scale_factor() == 1.0f ? 2.0f : 1.0f); 1057 display_info.device_scale_factor() == 1.0f ? 2.0f : 1.0f);
1064 new_display_info_list.push_back(display_info); 1058 new_display_info_list.push_back(display_info);
1065 } 1059 }
1066 AddMirrorDisplayInfoIfAny(&new_display_info_list); 1060 AddMirrorDisplayInfoIfAny(&new_display_info_list);
1067 UpdateDisplays(new_display_info_list); 1061 UpdateDisplays(new_display_info_list);
1068 } 1062 }
1069 1063
1070 #if defined(OS_CHROMEOS) 1064 #if defined(OS_CHROMEOS)
1071 void DisplayManager::SetSoftwareMirroring(bool enabled) { 1065 void DisplayManager::SetSoftwareMirroring(bool enabled) {
1072 // TODO(oshima|bshe): Support external display on the system
1073 // that has virtual keyboard display.
1074 if (second_display_mode_ == VIRTUAL_KEYBOARD)
1075 return;
1076 SetSecondDisplayMode(enabled ? MIRRORING : EXTENDED); 1066 SetSecondDisplayMode(enabled ? MIRRORING : EXTENDED);
1077 } 1067 }
1078 1068
1079 bool DisplayManager::SoftwareMirroringEnabled() const { 1069 bool DisplayManager::SoftwareMirroringEnabled() const {
1080 return software_mirroring_enabled(); 1070 return software_mirroring_enabled();
1081 } 1071 }
1082 #endif 1072 #endif
1083 1073
1084 void DisplayManager::SetSecondDisplayMode(SecondDisplayMode mode) { 1074 void DisplayManager::SetSecondDisplayMode(SecondDisplayMode mode) {
1085 second_display_mode_ = mode; 1075 second_display_mode_ = mode;
(...skipping 173 matching lines...) Expand 10 before | Expand all | Expand 10 after
1259 new_secondary_origin.Offset(-secondary_bounds.width(), offset); 1249 new_secondary_origin.Offset(-secondary_bounds.width(), offset);
1260 break; 1250 break;
1261 } 1251 }
1262 gfx::Insets insets = secondary_display->GetWorkAreaInsets(); 1252 gfx::Insets insets = secondary_display->GetWorkAreaInsets();
1263 secondary_display->set_bounds( 1253 secondary_display->set_bounds(
1264 gfx::Rect(new_secondary_origin, secondary_bounds.size())); 1254 gfx::Rect(new_secondary_origin, secondary_bounds.size()));
1265 secondary_display->UpdateWorkAreaFromInsets(insets); 1255 secondary_display->UpdateWorkAreaFromInsets(insets);
1266 } 1256 }
1267 1257
1268 } // namespace ash 1258 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698