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

Issue 895993002: Correcly Report CanEnterMaximizeMode on devices without accelerometers (Closed)

Created:
5 years, 10 months ago by jonross
Modified:
5 years, 10 months ago
Reviewers:
flackr, oshima
CC:
chromium-reviews, kalyank, sadrul
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Correcly Report CanEnterMaximizeMode on devices withou accelerometers MaximizeModeController::CanEnterMaximizeMode was based on receiving an accelerometer event. AccelerometerReader now sends an event to every observer as it is added, to reduce lag on receiving first event. However on devices without accelerometers this sends an empty event. Updated MaximizeModeController to not set that accelerometer events have been seen until a valid event is received. One with actual data. TEST=MaximizeModeControllerTest.CanEnterMaximizeModeRequiresValidAccelerometerUpdate BUG=454662 Committed: https://crrev.com/1418c1251a9d1ca13e2e1afb84d31891fe77e80e Cr-Commit-Position: refs/heads/master@{#315307}

Patch Set 1 #

Total comments: 2

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Total comments: 4

Patch Set 4 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+27 lines, -2 lines) Patch
M ash/wm/maximize_mode/maximize_mode_controller_unittest.cc View 1 2 3 1 chunk +19 lines, -0 lines 0 comments Download
M chromeos/accelerometer/accelerometer_reader.h View 1 2 3 1 chunk +3 lines, -0 lines 0 comments Download
M chromeos/accelerometer/accelerometer_reader.cc View 1 2 3 3 chunks +5 lines, -2 lines 0 comments Download

Messages

Total messages: 16 (4 generated)
jonross
Hi Rob, Can you review this change? I'm updating the logic for CanEnterMaximizeMode to account ...
5 years, 10 months ago (2015-02-03 22:22:44 UTC) #2
flackr
Wouldn't it be better to not send an update immediately if we haven't received any ...
5 years, 10 months ago (2015-02-03 22:32:11 UTC) #3
jonross
https://codereview.chromium.org/895993002/diff/1/ash/wm/maximize_mode/maximize_mode_controller.cc File ash/wm/maximize_mode/maximize_mode_controller.cc (right): https://codereview.chromium.org/895993002/diff/1/ash/wm/maximize_mode/maximize_mode_controller.cc#newcode145 ash/wm/maximize_mode/maximize_mode_controller.cc:145: EnterMaximizeMode(); On 2015/02/03 22:32:11, flackr wrote: > Seems like ...
5 years, 10 months ago (2015-02-04 18:31:23 UTC) #4
flackr
https://codereview.chromium.org/895993002/diff/20001/chromeos/accelerometer/accelerometer_reader.cc File chromeos/accelerometer/accelerometer_reader.cc (right): https://codereview.chromium.org/895993002/diff/20001/chromeos/accelerometer/accelerometer_reader.cc#newcode207 chromeos/accelerometer/accelerometer_reader.cc:207: update_.has(chromeos::ACCELEROMETER_SOURCE_SCREEN)) { I'd prefer adding a bool for if ...
5 years, 10 months ago (2015-02-04 18:44:52 UTC) #5
jonross
https://codereview.chromium.org/895993002/diff/20001/chromeos/accelerometer/accelerometer_reader.cc File chromeos/accelerometer/accelerometer_reader.cc (right): https://codereview.chromium.org/895993002/diff/20001/chromeos/accelerometer/accelerometer_reader.cc#newcode207 chromeos/accelerometer/accelerometer_reader.cc:207: update_.has(chromeos::ACCELEROMETER_SOURCE_SCREEN)) { On 2015/02/04 18:44:52, flackr wrote: > I'd ...
5 years, 10 months ago (2015-02-04 19:00:59 UTC) #6
flackr
LGTM with nits https://codereview.chromium.org/895993002/diff/40001/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc File ash/wm/maximize_mode/maximize_mode_controller_unittest.cc (right): https://codereview.chromium.org/895993002/diff/40001/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc#newcode349 ash/wm/maximize_mode/maximize_mode_controller_unittest.cc:349: // Tests that when and empty ...
5 years, 10 months ago (2015-02-06 20:18:21 UTC) #7
jonross
https://codereview.chromium.org/895993002/diff/40001/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc File ash/wm/maximize_mode/maximize_mode_controller_unittest.cc (right): https://codereview.chromium.org/895993002/diff/40001/ash/wm/maximize_mode/maximize_mode_controller_unittest.cc#newcode349 ash/wm/maximize_mode/maximize_mode_controller_unittest.cc:349: // Tests that when and empty accelerometer update is ...
5 years, 10 months ago (2015-02-09 14:54:48 UTC) #9
jonross
oshima@chromium.org: Please review changes in chromeos/accelerometer/
5 years, 10 months ago (2015-02-09 14:55:32 UTC) #11
oshima
lgtm
5 years, 10 months ago (2015-02-09 15:17:29 UTC) #12
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/895993002/60001
5 years, 10 months ago (2015-02-09 15:19:45 UTC) #14
commit-bot: I haz the power
Committed patchset #4 (id:60001)
5 years, 10 months ago (2015-02-09 15:52:59 UTC) #15
commit-bot: I haz the power
5 years, 10 months ago (2015-02-09 15:53:39 UTC) #16
Message was sent while issue was closed.
Patchset 4 (id:??) landed as
https://crrev.com/1418c1251a9d1ca13e2e1afb84d31891fe77e80e
Cr-Commit-Position: refs/heads/master@{#315307}

Powered by Google App Engine
This is Rietveld 408576698