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

Issue 2533373002: Enabled/disable touch screen in TabletPowerButtonController (Closed)

Created:
4 years ago by Qiang(Joe) Xu
Modified:
4 years ago
CC:
chromium-reviews, davemoore+watch_chromium.org, kalyank, sadrul, oshima+watch_chromium.org, derat+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enabled/disable touch screen in TabletPowerButtonController By exposing several apis in input_device_settings.h and add new local pref for TouchScreenEnabled, we can disable touch screen events when backlights are forced off so that no screen UI events can be triggered and enable touch screen when stopping backlights forced off is called properly. BUG=655388 BUG=633304 TEST=manual test on device, and add test coverage. also test that this added behavior is compatible with toggle touchscreen shortcut The shortcut induced in https://codereview.chromium.org/2467023004 is per user pref, backlights-forced-off related touch screen status is per device pref. The final hardware touchscreen status is determined by the rule: enabled_in_local_state && enabled_in_user_pref Committed: https://crrev.com/4c8baedbf7a0b83ec7b5fd77dc1f5d5627fe6dd7 Cr-Commit-Position: refs/heads/master@{#436177}

Patch Set 1 #

Patch Set 2 : touch_screen_status #

Total comments: 4

Patch Set 3 : add SetTouchscreenEnabled and OnLoginStateChanged #

Total comments: 16

Patch Set 4 : rebase #

Patch Set 5 : add local pref for TouchScreenEnabled #

Total comments: 6

Patch Set 6 : incorporate comments from gab@ and afakhry@ #

Total comments: 23

Patch Set 7 : based on comments from derat@ #

Total comments: 16

Patch Set 8 : based on derat@'s comments #

Patch Set 9 : style of pref name for local #

Total comments: 2

Patch Set 10 : nits #

Unified diffs Side-by-side diffs Delta from patch set Stats (+251 lines, -69 lines) Patch
M ash/common/accelerators/debug_commands.cc View 1 2 3 4 5 6 1 chunk +5 lines, -1 line 0 comments Download
M ash/common/shell_delegate.h View 1 2 3 4 5 6 7 8 9 1 chunk +14 lines, -2 lines 0 comments Download
M ash/mus/shell_delegate_mus.h View 1 2 3 4 5 6 1 chunk +4 lines, -0 lines 0 comments Download
M ash/mus/shell_delegate_mus.cc View 1 2 3 4 5 6 1 chunk +14 lines, -0 lines 0 comments Download
M ash/shell/shell_delegate_impl.h View 1 2 3 4 5 6 7 1 chunk +4 lines, -0 lines 0 comments Download
M ash/shell/shell_delegate_impl.cc View 1 2 3 4 5 6 1 chunk +10 lines, -0 lines 0 comments Download
M ash/system/chromeos/power/tablet_power_button_controller.h View 1 2 3 4 5 6 1 chunk +4 lines, -2 lines 0 comments Download
M ash/system/chromeos/power/tablet_power_button_controller.cc View 1 2 3 4 5 6 5 chunks +17 lines, -7 lines 0 comments Download
M ash/system/chromeos/power/tablet_power_button_controller_unittest.cc View 1 2 3 4 4 chunks +42 lines, -0 lines 0 comments Download
M ash/test/test_shell_delegate.h View 1 2 3 4 5 6 2 chunks +6 lines, -0 lines 0 comments Download
M ash/test/test_shell_delegate.cc View 1 2 3 4 5 6 2 chunks +14 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/chrome_browser_main_chromeos.cc View 1 2 3 4 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/chromeos/preferences.cc View 1 2 3 4 1 chunk +1 line, -2 lines 0 comments Download
M chrome/browser/chromeos/system/input_device_settings.h View 1 2 3 4 5 6 7 8 9 1 chunk +20 lines, -7 lines 0 comments Download
M chrome/browser/chromeos/system/input_device_settings.cc View 1 2 3 4 5 6 7 8 2 chunks +56 lines, -29 lines 0 comments Download
M chrome/browser/prefs/browser_prefs.cc View 1 2 3 4 5 6 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate.h View 1 2 3 4 5 6 1 chunk +4 lines, -1 line 0 comments Download
M chrome/browser/ui/ash/chrome_shell_delegate.cc View 1 2 3 4 5 6 1 chunk +17 lines, -4 lines 0 comments Download
M chrome/common/pref_names.h View 1 2 3 4 5 6 7 8 2 chunks +3 lines, -2 lines 0 comments Download
M chrome/common/pref_names.cc View 1 2 3 4 5 6 7 8 3 chunks +11 lines, -10 lines 0 comments Download

Messages

Total messages: 46 (28 generated)
Qiang(Joe) Xu
Hi Daniel & Steven, this cl is proposed to solve the issue described in the ...
4 years ago (2016-11-29 20:01:17 UTC) #3
Daniel Erat
can you also get a review from whoever wrote the input_device_settings code? https://codereview.chromium.org/2533373002/diff/20001/ash/common/shell_delegate.h File ash/common/shell_delegate.h ...
4 years ago (2016-11-29 21:03:37 UTC) #4
Qiang(Joe) Xu
+achuith@ for review on input_device_settings.h related changes. Because I add IsTouchscreenEnabled/SetTouchscreenEnabled and remove ToggleTouchscreen. Please ...
4 years ago (2016-11-30 22:09:11 UTC) #10
Daniel Erat
https://codereview.chromium.org/2533373002/diff/100001/ash/common/accelerators/debug_commands.cc File ash/common/accelerators/debug_commands.cc (right): https://codereview.chromium.org/2533373002/diff/100001/ash/common/accelerators/debug_commands.cc#newcode133 ash/common/accelerators/debug_commands.cc:133: delegate->SetTouchscreenEnabled(!touch_screen_status); nit: i'd just inline this, e.g. delegate->SetTouchscreenEnabled(!delegate->IsTouchscreenEnabled()); https://codereview.chromium.org/2533373002/diff/100001/ash/common/shell_delegate.h ...
4 years ago (2016-11-30 22:58:07 UTC) #11
Qiang(Joe) Xu
Hi all, this change basically adds a new local pref for touchscreenenabled, and separate SetPref ...
4 years ago (2016-12-02 17:42:52 UTC) #18
gab
prefs lgtm w/ nit https://codereview.chromium.org/2533373002/diff/180001/chrome/common/pref_names.cc File chrome/common/pref_names.cc (right): https://codereview.chromium.org/2533373002/diff/180001/chrome/common/pref_names.cc#newcode1319 chrome/common/pref_names.cc:1319: // *************** LOCAL STATE *************** ...
4 years ago (2016-12-02 19:10:02 UTC) #19
achuithb
input_device_settings lgtm
4 years ago (2016-12-02 19:41:42 UTC) #20
afakhry
https://codereview.chromium.org/2533373002/diff/180001/ash/common/accelerators/debug_commands.cc File ash/common/accelerators/debug_commands.cc (right): https://codereview.chromium.org/2533373002/diff/180001/ash/common/accelerators/debug_commands.cc#newcode133 ash/common/accelerators/debug_commands.cc:133: !delegate->IsTouchscreenEnabledInPrefs(false), false); Nit: false /* is_local */. https://codereview.chromium.org/2533373002/diff/180001/chrome/browser/chromeos/system/input_device_settings.cc File ...
4 years ago (2016-12-02 20:04:28 UTC) #21
Qiang(Joe) Xu
https://codereview.chromium.org/2533373002/diff/180001/ash/common/accelerators/debug_commands.cc File ash/common/accelerators/debug_commands.cc (right): https://codereview.chromium.org/2533373002/diff/180001/ash/common/accelerators/debug_commands.cc#newcode133 ash/common/accelerators/debug_commands.cc:133: !delegate->IsTouchscreenEnabledInPrefs(false), false); On 2016/12/02 20:04:27, afakhry wrote: > Nit: ...
4 years ago (2016-12-02 21:23:14 UTC) #22
Daniel Erat
https://codereview.chromium.org/2533373002/diff/200001/ash/common/shell_delegate.h File ash/common/shell_delegate.h (right): https://codereview.chromium.org/2533373002/diff/200001/ash/common/shell_delegate.h#newcode138 ash/common/shell_delegate.h:138: virtual bool IsTouchscreenEnabledInPrefs(bool is_local) const = 0; is_local feels ...
4 years ago (2016-12-02 21:48:57 UTC) #23
afakhry
https://codereview.chromium.org/2533373002/diff/200001/chrome/browser/chromeos/system/input_device_settings.cc File chrome/browser/chromeos/system/input_device_settings.cc (right): https://codereview.chromium.org/2533373002/diff/200001/chrome/browser/chromeos/system/input_device_settings.cc#newcode295 chrome/browser/chromeos/system/input_device_settings.cc:295: SetTouchscreensEnabled(IsTouchscreenEnabledInPrefs(true) == On 2016/12/02 21:48:56, Daniel Erat wrote: > ...
4 years ago (2016-12-02 22:33:20 UTC) #24
Qiang(Joe) Xu
Hi, new patch based on derat@'s comments, thanks! https://codereview.chromium.org/2533373002/diff/200001/ash/common/shell_delegate.h File ash/common/shell_delegate.h (right): https://codereview.chromium.org/2533373002/diff/200001/ash/common/shell_delegate.h#newcode138 ash/common/shell_delegate.h:138: virtual ...
4 years ago (2016-12-02 23:55:11 UTC) #25
Daniel Erat
https://codereview.chromium.org/2533373002/diff/220001/ash/common/shell_delegate.h File ash/common/shell_delegate.h (right): https://codereview.chromium.org/2533373002/diff/220001/ash/common/shell_delegate.h#newcode137 ash/common/shell_delegate.h:137: // prefs, otherwise from user prefs. nit: s/local prefs/local ...
4 years ago (2016-12-03 00:08:44 UTC) #26
Qiang(Joe) Xu
Hi, here is the reply and new patch, thanks! https://codereview.chromium.org/2533373002/diff/220001/ash/common/shell_delegate.h File ash/common/shell_delegate.h (right): https://codereview.chromium.org/2533373002/diff/220001/ash/common/shell_delegate.h#newcode137 ash/common/shell_delegate.h:137: ...
4 years ago (2016-12-03 01:02:44 UTC) #31
Daniel Erat
lgtm w/nits but i'd still prefer reusing the same pref constant for local state if ...
4 years ago (2016-12-03 03:11:55 UTC) #36
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2533373002/300001
4 years ago (2016-12-03 21:52:29 UTC) #41
commit-bot: I haz the power
Committed patchset #10 (id:300001)
4 years ago (2016-12-03 22:39:19 UTC) #44
commit-bot: I haz the power
4 years ago (2016-12-03 22:41:00 UTC) #46
Message was sent while issue was closed.
Patchset 10 (id:??) landed as
https://crrev.com/4c8baedbf7a0b83ec7b5fd77dc1f5d5627fe6dd7
Cr-Commit-Position: refs/heads/master@{#436177}

Powered by Google App Engine
This is Rietveld 408576698