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

Issue 10755002: Refactors DeviceOrientation to make it more extensible (Closed)

Created:
8 years, 5 months ago by aousterh
Modified:
7 years, 6 months ago
Reviewers:
hans, bulach, Steve Block
CC:
chromium-reviews, joi+watch-content_chromium.org, darin-cc_chromium.org, jam
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

Refactors DeviceOrientation to make it more extensible This refactors the ProviderImpl in DeviceOrientation to make it more general. This will make it easy to add other types of device data (such as DeviceMotion) in the future and to have them use the same Provider/ProviderImpl. This is an alternative to http://codereview.chromium.org/10689106. TBR=avi BUG=none TEST=browser_tests:DeviceOrientationBrowserTest.BasicTest, content_unittests --gtest_filter=DeviceOrientation* Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=149864

Patch Set 1 #

Total comments: 1

Patch Set 2 : Moves construction of DeviceData objects out of ProviderImpl #

Total comments: 38

Patch Set 3 : Adds MessageFilter base class, responds to comments #

Patch Set 4 : Handles null device_data in observer #

Total comments: 46

Patch Set 5 : Makes DeviceData RefCounted, responds to other comments #

Patch Set 6 : Removing unused function IsEmpty #

Total comments: 16

Patch Set 7 : Rebases onto master #

Patch Set 8 : Adds a unit test, responds to other comments #

Total comments: 10

Patch Set 9 : Minor changes #

Patch Set 10 : Replaces scoped_ptr with scoped_refptr #

Patch Set 11 : Small changes to appease try bots #

Unified diffs Side-by-side diffs Delta from patch set Stats (+816 lines, -486 lines) Patch
M content/browser/device_orientation/accelerometer_mac.h View 1 2 3 4 1 chunk +5 lines, -1 line 0 comments Download
M content/browser/device_orientation/accelerometer_mac.cc View 1 2 3 4 4 chunks +11 lines, -3 lines 0 comments Download
M content/browser/device_orientation/data_fetcher.h View 1 2 3 4 1 chunk +6 lines, -6 lines 0 comments Download
M content/browser/device_orientation/data_fetcher_impl_android.h View 1 2 3 4 5 6 7 8 9 2 chunks +11 lines, -8 lines 0 comments Download
M content/browser/device_orientation/data_fetcher_impl_android.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +12 lines, -5 lines 0 comments Download
A content/browser/device_orientation/device_data.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +40 lines, -0 lines 0 comments Download
M content/browser/device_orientation/device_orientation_browsertest.cc View 1 2 3 4 5 6 3 chunks +17 lines, -11 lines 0 comments Download
A + content/browser/device_orientation/message_filter.h View 1 2 3 4 5 6 7 8 1 chunk +16 lines, -14 lines 0 comments Download
A content/browser/device_orientation/message_filter.cc View 1 2 1 chunk +39 lines, -0 lines 0 comments Download
A content/browser/device_orientation/observer_delegate.h View 1 2 3 4 5 6 7 1 chunk +45 lines, -0 lines 0 comments Download
A content/browser/device_orientation/observer_delegate.cc View 1 2 3 4 1 chunk +42 lines, -0 lines 0 comments Download
M content/browser/device_orientation/orientation.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +15 lines, -38 lines 0 comments Download
A content/browser/device_orientation/orientation.cc View 1 2 3 4 5 1 chunk +70 lines, -0 lines 0 comments Download
M content/browser/device_orientation/orientation_message_filter.h View 1 2 2 chunks +2 lines, -14 lines 0 comments Download
M content/browser/device_orientation/orientation_message_filter.cc View 1 2 3 4 3 chunks +4 lines, -75 lines 0 comments Download
M content/browser/device_orientation/provider.h View 1 2 3 4 5 6 7 2 chunks +13 lines, -6 lines 0 comments Download
M content/browser/device_orientation/provider_impl.h View 1 2 3 4 5 6 7 5 chunks +17 lines, -8 lines 0 comments Download
M content/browser/device_orientation/provider_impl.cc View 1 2 3 4 5 6 7 8 10 chunks +115 lines, -91 lines 0 comments Download
M content/browser/device_orientation/provider_unittest.cc View 1 2 3 4 5 6 7 8 10 chunks +329 lines, -205 lines 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 1 chunk +7 lines, -1 line 0 comments Download

Messages

Total messages: 22 (0 generated)
aousterh
This is an attempt to refactor ProviderImpl for DeviceOrientation so that DeviceMotion (and other types ...
8 years, 5 months ago (2012-07-09 17:07:53 UTC) #1
aousterh
I changed DataFetcher so that GetOrientation now returns a pointer to a DeviceData. This allows ...
8 years, 5 months ago (2012-07-11 20:11:25 UTC) #2
bulach
oh, this is getting into a nice shape, many thanks!! a few nits and suggestions ...
8 years, 5 months ago (2012-07-12 10:43:26 UTC) #3
aousterh
Thanks for the feedback! I made the changes you suggested, except for the one described ...
8 years, 5 months ago (2012-07-12 17:13:57 UTC) #4
aousterh
I fixed a small bug in this patch in observer_delegate.cc which occurred when NULL device_data ...
8 years, 5 months ago (2012-07-18 09:42:16 UTC) #5
hans
a bunch of comments below.. also, one important thing to bear in mind is that ...
8 years, 5 months ago (2012-07-18 17:21:02 UTC) #6
aousterh
On 2012/07/18 17:21:02, hans wrote: > a bunch of comments below.. > > also, one ...
8 years, 5 months ago (2012-07-20 11:18:31 UTC) #7
aousterh
http://codereview.chromium.org/10755002/diff/20001/content/browser/device_orientation/data_fetcher.h File content/browser/device_orientation/data_fetcher.h (right): http://codereview.chromium.org/10755002/diff/20001/content/browser/device_orientation/data_fetcher.h#newcode19 content/browser/device_orientation/data_fetcher.h:19: virtual DeviceData* GetDeviceData(DeviceData::Type device_data_type) = 0; I changed this ...
8 years, 5 months ago (2012-07-20 11:18:52 UTC) #8
aousterh
I realized that the function IsEmpty in DeviceData and Orientation is now unused, so I ...
8 years, 5 months ago (2012-07-20 13:00:27 UTC) #9
hans
Apologies for the slow reply. On 2012/07/20 11:18:52, aousterh wrote: > http://codereview.chromium.org/10755002/diff/20001/content/browser/device_orientation/device_data.h#newcode24 > content/browser/device_orientation/device_data.h:24: static ...
8 years, 4 months ago (2012-07-30 16:12:52 UTC) #10
aousterh
I added the unit test you recommended, which involved making a lot of changes to ...
8 years, 4 months ago (2012-08-03 11:08:14 UTC) #11
hans
just few minor nits, otherwise LGTM http://codereview.chromium.org/10755002/diff/46002/content/browser/device_orientation/data_fetcher_impl_android.cc File content/browser/device_orientation/data_fetcher_impl_android.cc (right): http://codereview.chromium.org/10755002/diff/46002/content/browser/device_orientation/data_fetcher_impl_android.cc#newcode75 content/browser/device_orientation/data_fetcher_impl_android.cc:75: return orientation; i ...
8 years, 4 months ago (2012-08-03 13:05:41 UTC) #12
aousterh
Thanks for the comments! Does this look ok? http://codereview.chromium.org/10755002/diff/46002/content/browser/device_orientation/data_fetcher_impl_android.cc File content/browser/device_orientation/data_fetcher_impl_android.cc (right): http://codereview.chromium.org/10755002/diff/46002/content/browser/device_orientation/data_fetcher_impl_android.cc#newcode75 content/browser/device_orientation/data_fetcher_impl_android.cc:75: return ...
8 years, 4 months ago (2012-08-03 13:42:18 UTC) #13
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aousterh@chromium.org/10755002/52024
8 years, 4 months ago (2012-08-03 13:53:07 UTC) #14
commit-bot: I haz the power
Presubmit check for 10755002-52024 failed and returned exit status 1. Running presubmit commit checks ...
8 years, 4 months ago (2012-08-03 13:53:16 UTC) #15
hans
On 2012/08/03 13:53:16, I haz the power (commit-bot) wrote: > Presubmit check for 10755002-52024 failed ...
8 years, 4 months ago (2012-08-03 13:55:36 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aousterh@chromium.org/10755002/52024
8 years, 4 months ago (2012-08-03 13:56:50 UTC) #17
commit-bot: I haz the power
Try job failure for 10755002-52024 (retry) on android for steps "compile, build" (clobber build). It's ...
8 years, 4 months ago (2012-08-03 14:12:49 UTC) #18
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/aousterh@chromium.org/10755002/39006
8 years, 4 months ago (2012-08-03 15:52:50 UTC) #19
commit-bot: I haz the power
Change committed as 149864
8 years, 4 months ago (2012-08-03 17:09:57 UTC) #20
Steve Block
Just noticed that I have a very old draft comment for this, but can we ...
7 years, 7 months ago (2013-05-27 01:36:03 UTC) #21
hans
7 years, 6 months ago (2013-05-28 08:53:55 UTC) #22
Message was sent while issue was closed.
On 2013/05/27 01:36:03, Steve Block wrote:
> Just noticed that I have a very old draft comment for this, but can we delete
> the issue?

The issue is already closed and the patch was landed. Is it still showing up on
your dashboard as active in some way?

Powered by Google App Engine
This is Rietveld 408576698