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

Issue 684932 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Closed: Yesterday
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Do we still need |have_seen_accelerometer_data_| in MaximizedModeController?

Project Member Reported by afakhry@chromium.org, Jan 25 2017

Issue description

It seems that we don't need this member anymore, since all TouchView-enabled devices have the #ash-enable-touch-view flag. 

The below comment will be removed as part of removing the #ash-touch-view-testing flag in https://codereview.chromium.org/2642853006/ included here for reference.

bool MaximizeModeController::CanEnterMaximizeMode() {
  // If we have ever seen accelerometer data, then HandleHingeRotation may
  // trigger maximize mode at some point in the future.
  // The --enable-touch-view-testing switch can also mean that we may enter
  // maximize mode.
  // TODO(mgiuca): This can result in false positives, as it returns true for
  // any device with an accelerometer. Have TouchView-enabled devices explicitly
  // set a flag, and change this implementation to simply return true iff the
  // flag is present ( http://crbug.com/457445 ).
  return have_seen_accelerometer_data_ ||
         base::CommandLine::ForCurrentProcess()->HasSwitch(
             switches::kAshEnableTouchViewTesting);
}
 
It is likely that we no longer need to reference this flag in CanEnterMaximizeMode.

However it is intended for triggering maximize mode on devices with only a screen sensor:

https://cs.chromium.org/chromium/src/ash/common/wm/maximize_mode/maximize_mode_controller.cc?rcl=1485332207&l=202

We could however just update that check:
if (!update->has(chromeos::ACCELEROMETER_SOURCE_ATTACHED_KEYBOARD) && !IsMaximizeModeWindowManagerEnabled()) {
      EnterMaximizeMode();
}
Components: UI>Shell>WindowManager
Owner: afakhry@chromium.org
Status: Assigned (was: Untriaged)
afakhry@ is this swill relevant?
Owner: weidongg@chromium.org

Comment 5 by weidongg@chromium.org, Yesterday (27 hours ago)

Status: WontFix (was: Assigned)
Close this since the MaximizeModeController does not exist any more.

Sign in to add a comment