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

Issue 795333002: Refactor AccelerometerReader to provide an Observer (Closed)

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

Description

Refactor AccelerometerReader to provide an Observer Change chromeos::AccelerometerReader from using a single delegate, to using observers. We need to begin listening to it from both ash/ and content/ Removed the abstraction ash::AccelerometerController, and updated all locations to use the reader directly. TEST=MaximizeModeControllerTes BUG=431865 Committed: https://crrev.com/8834fc4b4fe4997dd9b991ce5984e0d7e157a4d4 Cr-Commit-Position: refs/heads/master@{#309219}

Patch Set 1 #

Total comments: 13

Patch Set 2 : #

Total comments: 2

Patch Set 3 : #

Patch Set 4 : Fix linux compile #

Patch Set 5 : Restrict MaximizeModeControllerTest to ChromeOS #

Total comments: 2

Patch Set 6 : #

Patch Set 7 : Fix athena build #

Unified diffs Side-by-side diffs Delta from patch set Stats (+105 lines, -233 lines) Patch
M ash/BUILD.gn View 1 2 3 4 5 1 chunk +3 lines, -0 lines 0 comments Download
D ash/accelerometer/accelerometer_controller.h View 1 chunk +0 lines, -67 lines 0 comments Download
D ash/accelerometer/accelerometer_controller.cc View 1 chunk +0 lines, -41 lines 0 comments Download
D ash/accelerometer/accelerometer_observer.h View 1 chunk +0 lines, -27 lines 0 comments Download
M ash/ash.gyp View 1 2 3 4 2 chunks +1 line, -3 lines 0 comments Download
M ash/shell.h View 1 2 3 4 chunks +11 lines, -7 lines 0 comments Download
M ash/shell.cc View 1 2 3 3 chunks +3 lines, -3 lines 0 comments Download
M ash/wm/maximize_mode/maximize_mode_controller.h View 1 5 chunks +9 lines, -10 lines 0 comments Download
M ash/wm/maximize_mode/maximize_mode_controller.cc View 1 2 3 8 chunks +25 lines, -23 lines 0 comments Download
M ash/wm/maximize_mode/maximize_mode_controller_unittest.cc View 1 2 3 4 11 chunks +3 lines, -19 lines 0 comments Download
M athena/system/orientation_controller.h View 2 chunks +3 lines, -5 lines 0 comments Download
M athena/system/orientation_controller.cc View 1 2 3 4 5 6 1 chunk +6 lines, -3 lines 0 comments Download
M chrome/browser/ui/ash/ash_init.cc View 1 3 chunks +5 lines, -5 lines 0 comments Download
M chromeos/accelerometer/accelerometer_reader.h View 1 2 chunks +14 lines, -9 lines 0 comments Download
M chromeos/accelerometer/accelerometer_reader.cc View 1 3 chunks +22 lines, -11 lines 0 comments Download

Messages

Total messages: 28 (9 generated)
jonross
https://codereview.chromium.org/795333002/diff/1/ash/shell.cc File ash/shell.cc (right): https://codereview.chromium.org/795333002/diff/1/ash/shell.cc#newcode647 ash/shell.cc:647: scoped_ptr<::wm::NativeCursorManager>(native_cursor_manager_)), cpplint https://codereview.chromium.org/795333002/diff/1/ash/wm/maximize_mode/maximize_mode_controller.cc File ash/wm/maximize_mode/maximize_mode_controller.cc (right): https://codereview.chromium.org/795333002/diff/1/ash/wm/maximize_mode/maximize_mode_controller.cc#newcode204 ash/wm/maximize_mode/maximize_mode_controller.cc:204: void ...
6 years ago (2014-12-11 23:09:27 UTC) #2
flackr
https://codereview.chromium.org/795333002/diff/1/ash/wm/maximize_mode/maximize_mode_controller.cc File ash/wm/maximize_mode/maximize_mode_controller.cc (right): https://codereview.chromium.org/795333002/diff/1/ash/wm/maximize_mode/maximize_mode_controller.cc#newcode204 ash/wm/maximize_mode/maximize_mode_controller.cc:204: void MaximizeModeController::OnDisplayConfigurationChanged() { On 2014/12/11 23:09:27, jonross wrote: > ...
6 years ago (2014-12-12 16:47:11 UTC) #3
jonross
https://codereview.chromium.org/795333002/diff/1/ash/wm/maximize_mode/maximize_mode_controller.h File ash/wm/maximize_mode/maximize_mode_controller.h (right): https://codereview.chromium.org/795333002/diff/1/ash/wm/maximize_mode/maximize_mode_controller.h#newcode125 ash/wm/maximize_mode/maximize_mode_controller.h:125: // AccelerometerReader::Observer: On 2014/12/12 16:47:10, flackr wrote: > chromeos::AccelerometerReader::Observer: ...
6 years ago (2014-12-12 19:03:25 UTC) #4
flackr
lgtm
6 years ago (2014-12-15 13:52:42 UTC) #5
jonross
Hi Oshima, I am working towards moving accelerometer api into content, while the hardware reading ...
6 years ago (2014-12-16 14:38:37 UTC) #7
oshima
lgtm https://codereview.chromium.org/795333002/diff/20001/athena/system/orientation_controller.cc File athena/system/orientation_controller.cc (right): https://codereview.chromium.org/795333002/diff/20001/athena/system/orientation_controller.cc#newcode32 athena/system/orientation_controller.cc:32: OrientationController::~OrientationController() { how about DCHECK_FALSE(accelerometer_reader_.get()) ?
6 years ago (2014-12-16 16:50:54 UTC) #8
jonross
https://codereview.chromium.org/795333002/diff/20001/athena/system/orientation_controller.cc File athena/system/orientation_controller.cc (right): https://codereview.chromium.org/795333002/diff/20001/athena/system/orientation_controller.cc#newcode32 athena/system/orientation_controller.cc:32: OrientationController::~OrientationController() { On 2014/12/16 16:50:54, oshima wrote: > how ...
6 years ago (2014-12-19 02:03:42 UTC) #9
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/795333002/40001
6 years ago (2014-12-19 02:07:38 UTC) #11
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/27807) linux_chromium_gn_rel on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_rel/builds/44570)
6 years ago (2014-12-19 02:38:05 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/795333002/60001
6 years ago (2014-12-19 03:54:53 UTC) #15
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_gn_dbg on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_gn_dbg/builds/27829)
6 years ago (2014-12-19 04:02:45 UTC) #17
jonross
Rob, With the accelerometer being ChromeOS only, the MaximizeModeControllerTest can no longer be ran on ...
6 years ago (2014-12-19 14:48:39 UTC) #18
flackr
slgtm https://codereview.chromium.org/795333002/diff/80001/ash/BUILD.gn File ash/BUILD.gn (right): https://codereview.chromium.org/795333002/diff/80001/ash/BUILD.gn#newcode282 ash/BUILD.gn:282: # Acceleromter is only available on Chrome OS. ...
6 years ago (2014-12-19 15:43:53 UTC) #19
jonross
https://codereview.chromium.org/795333002/diff/80001/ash/BUILD.gn File ash/BUILD.gn (right): https://codereview.chromium.org/795333002/diff/80001/ash/BUILD.gn#newcode282 ash/BUILD.gn:282: # Acceleromter is only available on Chrome OS. On ...
6 years ago (2014-12-19 15:45:40 UTC) #21
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/795333002/100001
6 years ago (2014-12-19 15:45:48 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: linux_chromium_chromeos_rel_ng on tryserver.chromium.linux (http://build.chromium.org/p/tryserver.chromium.linux/builders/linux_chromium_chromeos_rel_ng/builds/9644)
6 years ago (2014-12-19 16:18:50 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/795333002/120001
6 years ago (2014-12-19 16:33:19 UTC) #26
commit-bot: I haz the power
Committed patchset #7 (id:120001)
6 years ago (2014-12-19 17:29:47 UTC) #27
commit-bot: I haz the power
6 years ago (2014-12-19 17:30:38 UTC) #28
Message was sent while issue was closed.
Patchset 7 (id:??) landed as
https://crrev.com/8834fc4b4fe4997dd9b991ce5984e0d7e157a4d4
Cr-Commit-Position: refs/heads/master@{#309219}

Powered by Google App Engine
This is Rietveld 408576698