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

Unified Diff: chrome/browser/extensions/display_info_provider_chromeos.cc

Issue 2824843002: MD Settings: Display: Disable orientaiton control in tablet mode (Closed)
Patch Set: Add test and trigger onDisplayChanged Created 3 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shell.cc ('k') | chrome/browser/extensions/display_info_provider_chromeos_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/extensions/display_info_provider_chromeos.cc
diff --git a/chrome/browser/extensions/display_info_provider_chromeos.cc b/chrome/browser/extensions/display_info_provider_chromeos.cc
index a7dc13e29d093f2fb7a283e22162fe0e78aee8db..bd67d7af7912d487a855e9b42d008f2f4b336894 100644
--- a/chrome/browser/extensions/display_info_provider_chromeos.cc
+++ b/chrome/browser/extensions/display_info_provider_chromeos.cc
@@ -645,11 +645,24 @@ DisplayInfoProviderChromeOS::GetAllDisplaysInfo(bool single_unified) {
NOTIMPLEMENTED();
return DisplayInfoProvider::DisplayUnitInfoList();
}
+ DisplayUnitInfoList all_displays;
+
display::DisplayManager* display_manager =
ash::Shell::Get()->display_manager();
- if (!display_manager->IsInUnifiedMode())
- return DisplayInfoProvider::GetAllDisplaysInfo(single_unified);
+ if (!display_manager->IsInUnifiedMode()) {
+ all_displays = DisplayInfoProvider::GetAllDisplaysInfo(single_unified);
+ if (IsMaximizeModeWindowManagerEnabled()) {
+ // Set is_maximize_mode for the primary display.
+ for (auto& display : all_displays) {
+ if (display.is_primary) {
+ display.is_maximize_mode = base::MakeUnique<bool>(true);
+ break;
+ }
+ }
+ }
+ return all_displays;
+ }
// Chrome OS specific: get displays for unified mode.
std::vector<display::Display> displays;
@@ -665,7 +678,6 @@ DisplayInfoProviderChromeOS::GetAllDisplaysInfo(bool single_unified) {
primary_id = displays[0].id();
}
- DisplayUnitInfoList all_displays;
for (const display::Display& display : displays) {
system_display::DisplayUnitInfo unit_info =
CreateDisplayUnitInfo(display, primary_id);
« no previous file with comments | « ash/shell.cc ('k') | chrome/browser/extensions/display_info_provider_chromeos_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698