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

Issue 682530 link

Starred by 3 users

Issue metadata

Status: Verified
Owner:
Closed: Jan 2017
Cc:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

Remove the ash-enable-touch-view-testing flag

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

Issue description

This flag is useless now. The shortcut has been changed to Ctrl+Alt+Shift+T, yet the flag description is still showing the old shortcut.

The shortcut is already hidden behind ash-debug-shortcuts, so no need for an extra flag.
 
Cc: derat@chromium.org warx@chromium.org
derat@, Oshima suggested that we should also remove the kAshEnableTouchView command-line switch. I see a couple of things depend on it, for example whether the TabletPowerButtonController should be created [1].

Are there any side effects of removing this switch?

[1]: https://chromium.googlesource.com/chromium/src/+blame/master/ash/wm/power_button_controller.cc#45

Comment 2 by derat@chromium.org, Jan 19 2017

Don't we currently use --enable-touchview (which is set by session_manager when the touchview USE flag is set) to enable maximize mode? How are you planning to decide when to enable all of the touch-related features without this flag?
Cc: osh...@chromium.org
Oshima and I discussed it further, and it seems that we could simplify by removing that switch and depending dynamically on whether we see accelerometer data or not. That's however a refactor for another day.

Comment 4 by derat@chromium.org, Jan 19 2017

Cc: mgiuca@chromium.org
There's a comment that specifically warns that using accelerometer data for this is error-prone:

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);
}

The current implementation seems intentional. See  issue 457445 .

Comment 5 by osh...@chromium.org, Jan 19 2017

 Issue 682028  has been merged into this issue.

Comment 6 by mgiuca@chromium.org, Jan 19 2017

IIRC this was implemented because we had absolutely no other way of knowing whether, for any given device, if that device supported touchview mode (i.e., could operate without a keyboard).

Since the only devices we knew of at the time (February 2015) were swing hinge devices (as opposed to detachable keyboard or some other mechanism), and also no other known devices had accelerometers, we were able to use this flag. But I was never happy with this as a solution.
Are all devices with accelerometers TouchView-enabled devices? Do all TouchView-enabled devices have accelerometers?

If there are false positives, then we might keep the kAshEnableTouchView flag and use it to filter out the false positive, since this flag seems to be set for all TouchView devices.

Please let me know so that I can update the CL.

Comment 8 by mgiuca@chromium.org, Jan 24 2017

#7: I have no idea if that's still true. It was in 2014.
Cc: jonr...@chromium.org
That testing flag is used to simulate the maximized mode UI with linux chromium
chromium os builds. So that we can debug issues without having to deploy to
chromebooks.

Combined with --ash-debug-shortcuts to trigger the UI with ctrl+alt+shift+t
Nevermind, my concerns in #9 are invalid. I had not realized that ash-debug-shortcuts alone was enough for testing.

#6 #7 We cannot rely on accelerometers alone. Samus has them, and is not a convertible. However devices which do support this mode set the command line "enable-touchview" (kAshEnableTouchView)

The testing flag can safely go away, and we should update CanEnterMaximizeMode to check that flag instead.
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 26 2017

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

commit 4bc67b96bd6c94833b002162e0bab92ff17a9752
Author: afakhry <afakhry@chromium.org>
Date: Thu Jan 26 19:44:10 2017

Remove the ash-enable-touch-view-testing flag

BUG= 682530 

Review-Url: https://codereview.chromium.org/2642853006
Cr-Commit-Position: refs/heads/master@{#446401}

[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/ash/common/ash_switches.cc
[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/ash/common/ash_switches.h
[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/ash/common/wm/maximize_mode/maximize_mode_controller.cc
[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/ash/content/display/screen_orientation_controller_chromeos_unittest.cc
[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/ash/system/chromeos/power/tablet_power_button_controller.cc
[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/ash/system/chromeos/power/tablet_power_button_controller_unittest.cc
[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc
[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/ash/wm/power_button_controller.cc
[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/ash/wm/session_state_animator.cc
[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/chrome/app/generated_resources.grd
[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/chrome/browser/about_flags.cc
[modify] https://crrev.com/4bc67b96bd6c94833b002162e0bab92ff17a9752/chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl_unittest.cc

Labels: M-58
Status: Fixed (was: Assigned)
Status: Verified (was: Fixed)

Sign in to add a comment