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

Issue 7273073: Animated Rotation (Closed)

Created:
9 years, 5 months ago by Ian Vollick
Modified:
9 years, 3 months ago
CC:
chromium-reviews, joi+watch-content_chromium.org, jam, davemoore+watch_chromium.org, dhollowa
Visibility:
Public.

Description

With this CL animated rotations can be triggered by visiting URLs like about:rotate?right. The about handler fires orientation events that the TouchBrowserFrameView is listening for. When notified, the TBFV either rotates itself, or the views desktop (if it is active). The animation code lives in views/animation and knows nothing about sensors. BUG=5247043 TEST=none Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=100148

Patch Set 1 #

Total comments: 6

Patch Set 2 : Use interpolated transforms #

Patch Set 3 : Remove some unused stuff in View #

Patch Set 4 : Comment update #

Patch Set 5 : Use new minimal sensor API #

Total comments: 7

Patch Set 6 : Moving the rotation code into views/animation #

Patch Set 7 : Gardening #

Patch Set 8 : Gardening #

Patch Set 9 : Gardening #

Patch Set 10 : Formatting and comment fix. #

Total comments: 1

Patch Set 11 : Do nothing for unexpected screen orientations. #

Total comments: 3

Patch Set 12 : Don't use camel case for getters and setters with no side effects #

Patch Set 13 : Don't use views:: when in the views namespace. #

Patch Set 14 : Inline trivial getter/setter. #

Total comments: 1

Patch Set 15 : Remove unused includes #

Total comments: 4

Patch Set 16 : Reimplement screen rotations in terms of layer animations #

Patch Set 17 : Formatting fix #

Patch Set 18 : Removed unnecessary include #

Total comments: 12

Patch Set 19 : Reimplement screen rotation using a custom property setter. #

Patch Set 20 : Pulled unnecessary changes out of this CL #

Patch Set 21 : Pulled unnecessary changes out of this CL #

Total comments: 16

Patch Set 22 : Moved screen rotation code under touch; use lock object to disable painting #

Total comments: 9

Patch Set 23 : Listen for painting to complete rather than posting tasks. #

Total comments: 5

Patch Set 24 : Move compositing notifications to Layer #

Total comments: 1

Patch Set 25 : Address reviewer comments. #

Patch Set 26 : Address reviewer comments #

Patch Set 27 : Address reviewer comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+996 lines, -36 lines) Patch
M chrome/browser/browser_about_handler.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 2 chunks +21 lines, -0 lines 0 comments Download
A chrome/browser/ui/touch/animation/screen_rotation.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +143 lines, -0 lines 0 comments Download
A chrome/browser/ui/touch/animation/screen_rotation.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +234 lines, -0 lines 0 comments Download
A chrome/browser/ui/touch/animation/screen_rotation_setter.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 1 chunk +22 lines, -0 lines 0 comments Download
A chrome/browser/ui/touch/animation/screen_rotation_setter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +125 lines, -0 lines 0 comments Download
M chrome/browser/ui/touch/frame/touch_browser_frame_view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 2 chunks +11 lines, -1 line 0 comments Download
M chrome/browser/ui/touch/frame/touch_browser_frame_view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 3 chunks +67 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +4 lines, -0 lines 0 comments Download
M chrome/common/url_constants.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M chrome/common/url_constants.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +1 line, -0 lines 0 comments Download
M ui/gfx/compositor/compositor.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +18 lines, -2 lines 0 comments Download
M ui/gfx/compositor/compositor.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +20 lines, -4 lines 0 comments Download
M ui/gfx/compositor/compositor.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 4 chunks +6 lines, -4 lines 0 comments Download
M ui/gfx/compositor/compositor_gl.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +2 lines, -2 lines 0 comments Download
M ui/gfx/compositor/compositor_gl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 2 chunks +2 lines, -2 lines 0 comments Download
A ui/gfx/compositor/compositor_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 1 chunk +23 lines, -0 lines 0 comments Download
A + ui/gfx/compositor/compositor_stub.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 0 chunks +-1 lines, --1 lines 0 comments Download
M ui/gfx/compositor/compositor_win.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +4 lines, -4 lines 0 comments Download
M ui/gfx/interpolated_transform.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 7 chunks +40 lines, -5 lines 0 comments Download
M ui/gfx/interpolated_transform.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 6 chunks +143 lines, -7 lines 0 comments Download
M ui/gfx/interpolated_transform_unittest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 4 chunks +39 lines, -3 lines 0 comments Download
A views/paint_lock.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +35 lines, -0 lines 0 comments Download
A views/paint_lock.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 1 chunk +19 lines, -0 lines 0 comments Download
M views/view.h View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 3 chunks +9 lines, -0 lines 0 comments Download
M views/view.cc View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 5 chunks +6 lines, -3 lines 0 comments Download
M views/views.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 1 chunk +2 lines, -0 lines 0 comments Download

Messages

Total messages: 51 (0 generated)
sadrul
Quick question before I go into too much details: is this demo expected to work ...
9 years, 5 months ago (2011-06-29 20:35:10 UTC) #1
Ian Vollick
On 2011/06/29 20:35:10, sadrul wrote: > Quick question before I go into too much details: ...
9 years, 5 months ago (2011-06-29 20:53:49 UTC) #2
cwolfe
Chiming in, since the content/ code is my fault :) The sensors:: code is pretty ...
9 years, 5 months ago (2011-06-29 22:44:47 UTC) #3
Jói
Is this intended for eventual check-in or will it remain an uncommitted patch? Cheers, Jói
9 years, 5 months ago (2011-06-30 16:59:57 UTC) #4
sadrul
On 2011/06/30 16:59:57, Jói wrote: > Is this intended for eventual check-in or will it ...
9 years, 5 months ago (2011-06-30 17:49:08 UTC) #5
Jói
I mainly have a high-level question: Does knowledge of sensors belong under content/ ? The ...
9 years, 5 months ago (2011-06-30 19:50:50 UTC) #6
cwolfe
On 2011/06/30 19:50:50, Jói wrote: > I mainly have a high-level question: Does knowledge of ...
9 years, 5 months ago (2011-06-30 20:35:09 UTC) #7
Jói
Thanks Chris, that sounds sensible. On Thu, Jun 30, 2011 at 4:35 PM, <cwolfe@chromium.org> wrote: ...
9 years, 5 months ago (2011-06-30 20:37:24 UTC) #8
Ian Vollick
Still far from submittable, but the power button is no longer hijacked. On 2011/06/30 20:37:24, ...
9 years, 5 months ago (2011-07-05 20:37:50 UTC) #9
Ian Vollick
Uses a new, minimal API from: http://codereview.chromium.org/7366011/
9 years, 5 months ago (2011-07-14 16:47:58 UTC) #10
sadrul
Some nits. I didn't look at the content/ code (are there are additional changes in ...
9 years, 5 months ago (2011-07-15 15:25:48 UTC) #11
Ian Vollick
On 2011/07/15 15:25:48, sadrul wrote: > Some nits. I didn't look at the content/ code ...
9 years, 5 months ago (2011-07-19 21:40:11 UTC) #12
cwolfe
LGTM once sadrul has re-landed 7366011. http://codereview.chromium.org/7273073/diff/30011/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc File chrome/browser/ui/touch/frame/touch_browser_frame_view.cc (right): http://codereview.chromium.org/7273073/diff/30011/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc#newcode393 chrome/browser/ui/touch/frame/touch_browser_frame_view.cc:393: SideToDegrees(change.upward)); ScreenOrientation::FRONT and ...
9 years, 5 months ago (2011-07-21 17:47:01 UTC) #13
Ian Vollick
On 2011/07/21 17:47:01, cwolfe wrote: > LGTM once sadrul has re-landed 7366011. > > http://codereview.chromium.org/7273073/diff/30011/chrome/browser/ui/touch/frame/touch_browser_frame_view.cc ...
9 years, 5 months ago (2011-07-21 19:30:44 UTC) #14
tfarina
http://codereview.chromium.org/7273073/diff/34001/views/animation/screen_rotation.h File views/animation/screen_rotation.h (right): http://codereview.chromium.org/7273073/diff/34001/views/animation/screen_rotation.h#newcode27 views/animation/screen_rotation.h:27: static void Perform(views::View* root, float old_degrees, float new_degrees); views:: ...
9 years, 5 months ago (2011-07-21 21:56:48 UTC) #15
tfarina
http://codereview.chromium.org/7273073/diff/34001/views/view.h File views/view.h (right): http://codereview.chromium.org/7273073/diff/34001/views/view.h#newcode254 views/view.h:254: void SetPaintingEnabled(bool enabled); this should have been set_painting_enabled http://codereview.chromium.org/7273073/diff/34001/views/view.h#newcode257 ...
9 years, 5 months ago (2011-07-21 21:58:31 UTC) #16
Ian Vollick
Got rid of camel case for trivial getters and setters: SetPaintingEnabled -> set_painting_enabled IsPaintingEnabled -> ...
9 years, 5 months ago (2011-07-22 14:21:11 UTC) #17
Ian Vollick
Sorry for the spam -- set_painting_enabled and painting_enabled are now inlined. On 2011/07/22 14:21:11, vollick ...
9 years, 5 months ago (2011-07-22 14:32:43 UTC) #18
tfarina
http://codereview.chromium.org/7273073/diff/42001/views/animation/screen_rotation.h File views/animation/screen_rotation.h (right): http://codereview.chromium.org/7273073/diff/42001/views/animation/screen_rotation.h#newcode12 views/animation/screen_rotation.h:12: #include "content/common/sensors.h" I don't think views/ can depend on ...
9 years, 5 months ago (2011-07-22 14:38:17 UTC) #19
Ian Vollick
On 2011/07/22 14:38:17, tfarina wrote: > http://codereview.chromium.org/7273073/diff/42001/views/animation/screen_rotation.h > File views/animation/screen_rotation.h (right): > > http://codereview.chromium.org/7273073/diff/42001/views/animation/screen_rotation.h#newcode12 > ...
9 years, 5 months ago (2011-07-22 14:48:40 UTC) #20
cwolfe
On 2011/07/22 14:38:17, tfarina wrote: > I don't think views/ can depend on content/. Any ...
9 years, 5 months ago (2011-07-22 14:50:41 UTC) #21
vollick1
I haven't had any problems with where you've put them. Screen rotation is now in ...
9 years, 5 months ago (2011-07-22 15:11:10 UTC) #22
Ian Vollick
+sky
9 years, 5 months ago (2011-07-27 16:37:42 UTC) #23
Ian Vollick
Updated subject and description.
9 years, 5 months ago (2011-07-27 16:43:16 UTC) #24
sky
http://codereview.chromium.org/7273073/diff/40014/views/animation/screen_rotation.cc File views/animation/screen_rotation.cc (right): http://codereview.chromium.org/7273073/diff/40014/views/animation/screen_rotation.cc#newcode34 views/animation/screen_rotation.cc:34: : root_(root), This will crash if the view is ...
9 years, 5 months ago (2011-07-27 22:16:19 UTC) #25
Ian Vollick
Reimplement screen rotation in terms of layer animations (rather than animating the view).
9 years, 4 months ago (2011-08-15 21:07:58 UTC) #26
sky
http://codereview.chromium.org/7273073/diff/50001/chrome/browser/browser_about_handler.cc File chrome/browser/browser_about_handler.cc (right): http://codereview.chromium.org/7273073/diff/50001/chrome/browser/browser_about_handler.cc#newcode1517 chrome/browser/browser_about_handler.cc:1517: } else NOTREACHED? http://codereview.chromium.org/7273073/diff/50001/chrome/browser/browser_about_handler.cc#newcode1519 chrome/browser/browser_about_handler.cc:1519: host = chrome::kChromeUIBlankHost; Add ...
9 years, 4 months ago (2011-08-17 16:39:42 UTC) #27
Ian Vollick
Hi Scott, I've reworked the design as per our IM discussion. The TouchBrowserFrameView now installs ...
9 years, 4 months ago (2011-08-24 22:30:16 UTC) #28
sky
http://codereview.chromium.org/7273073/diff/58039/views/animation/screen_rotation.cc File views/animation/screen_rotation.cc (right): http://codereview.chromium.org/7273073/diff/58039/views/animation/screen_rotation.cc#newcode18 views/animation/screen_rotation.cc:18: const int kDefaultTransitionDurationMs = 500; 500ms is pretty long ...
9 years, 4 months ago (2011-08-25 03:00:13 UTC) #29
Ian Vollick
Things to note in this patch: - Screen rotation code has been moved to chrome/browser/ui/touch/animation ...
9 years, 4 months ago (2011-08-25 20:34:48 UTC) #30
sky
http://codereview.chromium.org/7273073/diff/63002/chrome/browser/ui/touch/animation/screen_rotation.cc File chrome/browser/ui/touch/animation/screen_rotation.cc (right): http://codereview.chromium.org/7273073/diff/63002/chrome/browser/ui/touch/animation/screen_rotation.cc#newcode50 chrome/browser/ui/touch/animation/screen_rotation.cc:50: // If we post a delayed task, it will ...
9 years, 4 months ago (2011-08-25 21:10:12 UTC) #31
Ian Vollick
Noteworthy change: - I added a PaintListener class that can be installed on a view ...
9 years, 4 months ago (2011-08-26 18:47:39 UTC) #32
sky
http://codereview.chromium.org/7273073/diff/71001/views/paint_listener.cc File views/paint_listener.cc (right): http://codereview.chromium.org/7273073/diff/71001/views/paint_listener.cc#newcode9 views/paint_listener.cc:9: PaintListener::~PaintListener() { It's ok to inline this in the ...
9 years, 4 months ago (2011-08-26 19:10:24 UTC) #33
Ben Goodger (Google)
Can you provide a succinct description of the design of this feature? I have a ...
9 years, 4 months ago (2011-08-26 19:30:00 UTC) #34
vollick1
Hi Ben, I've posted a very high level document here. https://docs.google.com/a/google.com/document/d/1vgFAGy_TaOYakNsLsW13PB20-FSItw4HgNTxBl59ky0/edit?hl=en_USplease let me know if ...
9 years, 4 months ago (2011-08-26 20:58:20 UTC) #35
Ben Goodger (Google)
Thanks for the explanation. When I spoke to sky@ he liked my idea of moving ...
9 years, 3 months ago (2011-08-30 17:21:18 UTC) #36
Ben Goodger (Google)
I think at some point we should investigate the event system in views... I can ...
9 years, 3 months ago (2011-08-30 17:40:12 UTC) #37
vollick1
Hi Ben, Just to summarize the problem: the new class ScreenRotation needs to be notified ...
9 years, 3 months ago (2011-08-30 18:57:45 UTC) #38
Ben Goodger (Google)
Naming convention - whatever the method name is in NativeWidgetPlatform::OnFoo -> OnNativeWidgetFoo'ed on NativeWidgetDelegate. Widget ...
9 years, 3 months ago (2011-08-30 19:02:18 UTC) #39
vollick1
Yes, I believe that cros has two subclasses, one also named BrowserView and another named ...
9 years, 3 months ago (2011-08-30 19:39:10 UTC) #40
Ben Goodger (Google)
Since the BrowserView is the WidgetDelegate, it is the preferred cruft collector :-) -Ben On ...
9 years, 3 months ago (2011-08-30 19:46:55 UTC) #41
vollick1
Would it be alright if I were to implement the WidgetDelegate change in a separate ...
9 years, 3 months ago (2011-08-31 14:21:04 UTC) #42
Ben Goodger (Google)
I don't want to add these methods to View, even as an intermediate step. -Ben ...
9 years, 3 months ago (2011-08-31 17:51:42 UTC) #43
vollick1
Yes, I agree. At sky@'s suggestion, I had reverted the interface change to View. The ...
9 years, 3 months ago (2011-08-31 18:14:25 UTC) #44
Ben Goodger (Google)
LGTM http://codereview.chromium.org/7273073/diff/79001/views/view.h File views/view.h (right): http://codereview.chromium.org/7273073/diff/79001/views/view.h#newcode1234 views/view.h:1234: void set_painting_enabled(bool enabled) { painting_enabled_ = enabled; } ...
9 years, 3 months ago (2011-08-31 20:34:00 UTC) #45
sky
This now bulks up every Layer for state that you generally only care about at ...
9 years, 3 months ago (2011-08-31 20:35:09 UTC) #46
Ben Goodger (Google)
Sky reminded me that we both thought having the observer list at the compositor-level (or ...
9 years, 3 months ago (2011-08-31 20:38:24 UTC) #47
Ian Vollick
I've moved the observer list into the compositor and added a TODO to revisit paint ...
9 years, 3 months ago (2011-08-31 22:19:57 UTC) #48
sky
Yes, LGTM
9 years, 3 months ago (2011-08-31 22:44:47 UTC) #49
commit-bot: I haz the power
Can't process patch for file ui/gfx/compositor/compositor_stub.cc. A +
9 years, 3 months ago (2011-09-06 19:27:46 UTC) #50
Ian Vollick
9 years, 3 months ago (2011-09-08 18:50:09 UTC) #51
On 2011/09/06 19:27:46, I haz the power (commit-bot) wrote:
> Can't process patch for file ui/gfx/compositor/compositor_stub.cc.
> A +

Committed @100148

Powered by Google App Engine
This is Rietveld 408576698