New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 704929 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 1
Type: Bug



Sign in to add a comment

Disable display rotation in settings page in tablet mode (a.k.a touch view)

Project Member Reported by osh...@chromium.org, Mar 24 2017

Issue description

A user shouldn't be able to rotate to the orientation that conflicts with the application requested orientation, so let's disable it to avoid confusion.

A user still can change the rotation by tilting the device.
 
Cc: tbuck...@chromium.org
How do we identify tablet mode?

Also, shouldn't a user be able to change the orientation of their desktop?

Comment 2 by osh...@chromium.org, Mar 24 2017

> How do we identify tablet mode?
In c++, it's MaximiezModeController::IsMaximizeModeWindowManagerEnabled()

not sure what's the best way to hook this up on js side. We probably can add it to display api.

> Also, shouldn't a user be able to change the orientation of their desktop?
A user can rotate the device to change the orientation, but it may not rotate if an application locked the orientation.

Is this something we need for 58, or is 59 OK given that we are just trying to reduce confusion, not change functionality?

Comment 4 by osh...@chromium.org, Mar 27 2017

If it's risky to merge, 59 is ok.
Labels: -M-58 M-59
Labels: Hotlist-MD-Settings-Display
Labels: Proj-MaterialDesign-WebUI
I'm not marking this as a launch-blocker for MD Settings since we would launch in M59 without this. Please let me know if you disagree.
Two questions:

1) I assume MaximiezModeController::IsMaximizeModeWindowManagerEnabled() only applies when there is a single display?

2) Can that change dynamically? If so, what should be observed and how?

Status: Started (was: Assigned)

1) I assume MaximiezModeController::IsMaximizeModeWindowManagerEnabled() only 
applies when there is a single display?

Unfortunately, no. Ideally, we should disable only for internal display, but I think just disabling globally is fine.

2) ShellObserver has these methods.

https://cs.chromium.org/chromium/src/ash/shell_observer.h?rcl=7735ed2d044b9afaa1c853f003084a55e6c6e42a&l=61
OK, I am looking at how best to trigger a chrome.system.display.onDisplayChanged() event for when IsMaximizeModeWindowManagerEnabled() changes.

src/extensions does not currently depend on ash, and it probably shouldn't, so I can't make SystemInfoEventRouter an ash::ShellObserver.

SystemInfoEventRouter is however already a display::DisplayObserver.

I am thinking of having Shell::NotifyMaximizeModeStarted/Ended also call display_manager_->NotifyMetricsChanged(display_manager_->GetPrimaryDisplayCandidat(), DisplayObserver::DISPLAY_METRIC_MAXIMIZE_MODE);

WDYT?



Labels: -M-59 M-60
#8 agreed. This isn't critical, and we can punt this to 60.
Cc: osh...@chromium.org
Status: Assigned (was: Started)
I put up a CL for this here:
https://codereview.chromium.org/2824843002/

But am waiting on some changes by oshima@ per comment in the CL.

Labels: -M-60 M-61
Cc: steve...@chromium.org
Owner: osh...@chromium.org
Can you go ahead and reassign this to me when the display manager changes are ready (and what to call from the UI)?

Labels: -M-61 M-62
Owner: steve...@chromium.org
So, with the latest changes, what is the best way for the UI to query whether a Display is in tabled mode? Is the intention to use Display::accelerometer_support() == ACCELEROMETER_SUPPORT_AVAILABLE to disable the rotation toggle?

Yes, in your original CL use it instead of is_primary.
Status: Started (was: Assigned)

Comment 23 by r...@chromium.org, Aug 18 2017

Components: UI>Shell>WindowManager
Project Member

Comment 24 by bugdroid1@chromium.org, Sep 18 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/449ec1c2cf54c7664a6ab1ad96ed712057fda281

commit 449ec1c2cf54c7664a6ab1ad96ed712057fda281
Author: Steven Bennetts <stevenjb@chromium.org>
Date: Mon Sep 18 21:01:59 2017

system.display: Provide properties for accelerometer and tablet mode

This CL:
* Adds hasAccelerometerSupport to system.display.DisplayUnitInfo
* Adds isTabletMode to system.display.DisplayUnitInfo (only possible
  if hasAccelerometerSupport is true)
* Updates the Settings UI to disable the orientation control if
  isTabletMode is true

Bug:  704929 
Cq-Include-Trybots: master.tryserver.chromium.linux:closure_compilation
Change-Id: I043a85f6bb886392d5d493d4e519def08f00456c
Reviewed-on: https://chromium-review.googlesource.com/619295
Commit-Queue: Steven Bennetts <stevenjb@chromium.org>
Reviewed-by: Toni Barzic <tbarzic@chromium.org>
Reviewed-by: Devlin <rdevlin.cronin@chromium.org>
Reviewed-by: Mitsuru Oshima <oshima@chromium.org>
Reviewed-by: Xiyuan Xia <xiyuan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#502673}
[modify] https://crrev.com/449ec1c2cf54c7664a6ab1ad96ed712057fda281/chrome/browser/extensions/display_info_provider_chromeos.cc
[modify] https://crrev.com/449ec1c2cf54c7664a6ab1ad96ed712057fda281/chrome/browser/extensions/display_info_provider_chromeos_unittest.cc
[modify] https://crrev.com/449ec1c2cf54c7664a6ab1ad96ed712057fda281/chrome/browser/resources/settings/device_page/display.html
[modify] https://crrev.com/449ec1c2cf54c7664a6ab1ad96ed712057fda281/extensions/browser/api/system_display/display_info_provider.cc
[modify] https://crrev.com/449ec1c2cf54c7664a6ab1ad96ed712057fda281/extensions/common/api/system_display.idl
[modify] https://crrev.com/449ec1c2cf54c7664a6ab1ad96ed712057fda281/third_party/closure_compiler/externs/system_display.js

Status: Fixed (was: Started)
Labels: -M-62 M-63

Sign in to add a comment