Remove the ash-enable-touch-view-testing flag |
||||||
Issue descriptionThis 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.
,
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?
,
Jan 19 2017
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.
,
Jan 19 2017
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 .
,
Jan 19 2017
Issue 682028 has been merged into this issue.
,
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.
,
Jan 23 2017
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.
,
Jan 24 2017
#7: I have no idea if that's still true. It was in 2014.
,
Jan 25 2017
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
,
Jan 25 2017
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.
,
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
,
Jan 26 2017
,
Mar 6 2017
|
||||||
►
Sign in to add a comment |
||||||
Comment 1 by afakhry@chromium.org
, Jan 19 2017