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

Issue 2391883006: Mojo-ify implementation of screen orientation locking/unlocking. (Closed)

Created:
4 years, 2 months ago by lunalu1
Modified:
4 years, 1 month ago
CC:
Aaron Boodman, abarth-chromium, chromium-reviews, creis+watch_chromium.org, darin (slow to review), darin-cc_chromium.org, jam, mlamouri+watch-screen-orientation_chromium.org, mlamouri+watch-content_chromium.org, nasko+codewatch_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Mojo-ify implementation of screen orientation locking/unlocking. This CL creates a Mojo service to replace the //content-based IPC currently used for locking/unlocking screen orientation. Major changes: - Renderer and browser communicate via a Mojo interface defined in screen_orientation_service.mojom. - The browser-side ScreenOrientationImpl implements a Mojo interface that sends request to ScreenOrientationProvider in replacement of ScreenOrientationDispatcherHostImpl. - Request ID no longer have to be passed from the renderer to the browser, as the renderer binds the request ID associated with a request in the response callback that it creates for the request. - To ensure the ordering between ViewMsg_Resize and the screen orientation messages, WebContentsFrameBindingSet<T> is used on the browser side and GetRemoteAssociatedInterface (and mojom::ScreenOrientationAssociatedPtr) is is used on the renderer side to make the mojo interface share the same underlying pipe as the legacy IPC Channel. As a result, the unit tests for ScreenOrientationDispatcher is moved under content_browsertests as it requires a dummy remote associated interface for the tests to be run. BUG=612339 CQ_INCLUDE_TRYBOTS=master.tryserver.chromium.linux:linux_site_isolation Committed: https://crrev.com/d4a2cc818e19f277ea030e98cd86c477740ed1a6 Cr-Commit-Position: refs/heads/master@{#433714}

Patch Set 1 : Initial Implementation #

Patch Set 2 : PLEASE DO NOT REVIEW THIS IS BROKEN #

Patch Set 3 : Moved enum mojo definition to content/common due to dependency issue #

Total comments: 4

Patch Set 4 : Moved mojom definition from content/public/common/ to third_party/WebKit/public/platform/ #

Patch Set 5 : Rename ScreenOrientationService to ScreenOrientation #

Patch Set 6 : Ensure correct ordering between ViewMsg_Resize and screen orientation messages #

Total comments: 17

Patch Set 7 : Codereview update #

Total comments: 40

Patch Set 8 : Removing verification of lock success callback cause it was a bud #

Total comments: 6

Patch Set 9 : Code review changes (as to PS7) #

Total comments: 2

Patch Set 10 : Modified test for manifest_manager_messages.h #

Total comments: 26

Patch Set 11 : Codereview update #

Total comments: 14

Patch Set 12 : Codereview update #

Total comments: 9

Patch Set 13 : clup #

Unified diffs Side-by-side diffs Delta from patch set Stats (+454 lines, -735 lines) Patch
M content/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/android/content_view_core_impl.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -3 lines 0 comments Download
M content/browser/frame_host/render_frame_host_delegate.h View 1 2 3 4 5 6 7 8 9 10 2 chunks +4 lines, -0 lines 0 comments Download
M content/browser/frame_host/render_frame_host_delegate.cc View 1 2 3 4 5 6 7 8 9 10 1 chunk +5 lines, -0 lines 0 comments Download
A content/browser/screen_orientation/screen_orientation.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +47 lines, -0 lines 0 comments Download
A content/browser/screen_orientation/screen_orientation.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +66 lines, -0 lines 0 comments Download
D content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.h View 1 chunk +0 lines, -73 lines 0 comments Download
D content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.cc View 1 chunk +0 lines, -145 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.h View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +4 lines, -7 lines 0 comments Download
M content/browser/web_contents/web_contents_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 4 chunks +7 lines, -4 lines 0 comments Download
M content/common/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M content/common/DEPS View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
A content/common/screen_orientation.mojom View 1 2 3 4 5 6 7 8 9 10 1 chunk +13 lines, -0 lines 0 comments Download
M content/common/screen_orientation_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +1 line, -32 lines 0 comments Download
M content/public/browser/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 1 chunk +0 lines, -1 line 0 comments Download
D content/public/browser/screen_orientation_dispatcher_host.h View 1 2 3 4 5 6 1 chunk +0 lines, -36 lines 0 comments Download
M content/public/browser/screen_orientation_provider.h View 1 2 3 4 5 6 7 8 9 10 3 chunks +18 lines, -15 lines 0 comments Download
M content/public/browser/screen_orientation_provider.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +47 lines, -41 lines 0 comments Download
M content/renderer/screen_orientation/screen_orientation_dispatcher.h View 1 2 3 4 5 6 7 8 9 10 5 chunks +18 lines, -4 lines 0 comments Download
M content/renderer/screen_orientation/screen_orientation_dispatcher.cc View 1 2 3 4 5 6 7 8 9 10 3 chunks +50 lines, -30 lines 0 comments Download
A + content/renderer/screen_orientation/screen_orientation_dispatcher_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 9 chunks +38 lines, -96 lines 0 comments Download
M content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc View 1 2 3 4 5 1 chunk +0 lines, -242 lines 0 comments Download
M content/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 2 chunks +1 line, -1 line 0 comments Download
M third_party/WebKit/public/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/platform/modules/screen_orientation/OWNERS View 1 2 3 4 5 6 7 8 1 chunk +3 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/screen_orientation/WebScreenOrientationEnumTraits.h View 1 2 3 4 5 6 7 8 9 10 1 chunk +80 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/screen_orientation/screen_orientation_lock_types.mojom View 1 2 3 4 5 6 7 8 9 10 1 chunk +31 lines, -0 lines 0 comments Download
A third_party/WebKit/public/platform/modules/screen_orientation/screen_orientation_lock_types.typemap View 1 2 3 4 5 6 7 8 9 10 1 chunk +8 lines, -0 lines 0 comments Download
M third_party/WebKit/public/public_typemaps.gni View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
M third_party/WebKit/public/web/WebFrameOwnerProperties.h View 1 2 3 4 1 chunk +3 lines, -3 lines 0 comments Download

Messages

Total messages: 194 (157 generated)
lunalu1
Hi blundell, Please help me take a look at this CL. I moved the mojo ...
4 years, 2 months ago (2016-10-12 22:44:16 UTC) #17
blundell
Hi Luna, This is a good start! The biggest issue that I see is that ...
4 years, 2 months ago (2016-10-14 15:16:07 UTC) #35
lunalu1
On 2016/10/14 15:16:07, blundell wrote: > Hi Luna, > > This is a good start! ...
4 years, 2 months ago (2016-10-14 15:18:56 UTC) #36
blundell
On 2016/10/14 15:18:56, loonybear wrote: > On 2016/10/14 15:16:07, blundell wrote: > > Hi Luna, ...
4 years, 2 months ago (2016-10-14 15:23:13 UTC) #37
Ken Rockot(use gerrit already)
Per blundell's question on the bug, the pattern you want to follow here is probably ...
4 years, 2 months ago (2016-10-14 15:38:16 UTC) #39
lunalu1
Hi, Thank you for reviewing this CL. I made two major changes: 1. Renamed screen ...
4 years, 2 months ago (2016-10-20 23:28:48 UTC) #80
blundell
Thanks! https://codereview.chromium.org/2391883006/diff/340001/content/browser/frame_host/render_frame_host_delegate.h File content/browser/frame_host/render_frame_host_delegate.h (right): https://codereview.chromium.org/2391883006/diff/340001/content/browser/frame_host/render_frame_host_delegate.h#newcode174 content/browser/frame_host/render_frame_host_delegate.h:174: virtual ScreenOrientationImpl* GetScreenOrientation(); nit: I would just expose ...
4 years, 2 months ago (2016-10-21 18:16:31 UTC) #81
lunalu1
Thanks for reviewing my CL. I have made a few changes based on your comments. ...
4 years, 1 month ago (2016-10-24 16:57:36 UTC) #94
blundell
Hi Luna, This is looking really good! My bigest question is still about the short-circuiting ...
4 years, 1 month ago (2016-10-25 16:09:27 UTC) #97
chromium-reviews
That I will have to ask @rockot if I did it correctly. Luna Lu | ...
4 years, 1 month ago (2016-10-25 23:40:47 UTC) #98
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2391883006/diff/400001/content/browser/screen_orientation/screen_orientation_impl.cc File content/browser/screen_orientation/screen_orientation_impl.cc (right): https://codereview.chromium.org/2391883006/diff/400001/content/browser/screen_orientation/screen_orientation_impl.cc#newcode70 content/browser/screen_orientation/screen_orientation_impl.cc:70: binding_.GetCurrentTargetFrame() != web_contents_->GetMainFrame()) On 2016/10/25 at 16:09:26, blundell wrote: ...
4 years, 1 month ago (2016-10-26 21:59:54 UTC) #99
Ken Rockot(use gerrit already)
https://codereview.chromium.org/2391883006/diff/400001/content/browser/screen_orientation/screen_orientation_impl.h File content/browser/screen_orientation/screen_orientation_impl.h (right): https://codereview.chromium.org/2391883006/diff/400001/content/browser/screen_orientation/screen_orientation_impl.h#newcode42 content/browser/screen_orientation/screen_orientation_impl.h:42: WebContentsFrameBindingSet<mojom::ScreenOrientation> binding_; On 2016/10/25 at 16:09:26, blundell wrote: > ...
4 years, 1 month ago (2016-10-26 22:00:45 UTC) #100
blundell
https://codereview.chromium.org/2391883006/diff/400001/content/browser/screen_orientation/screen_orientation_impl.cc File content/browser/screen_orientation/screen_orientation_impl.cc (right): https://codereview.chromium.org/2391883006/diff/400001/content/browser/screen_orientation/screen_orientation_impl.cc#newcode70 content/browser/screen_orientation/screen_orientation_impl.cc:70: binding_.GetCurrentTargetFrame() != web_contents_->GetMainFrame()) On 2016/10/26 21:59:54, Ken Rockot wrote: ...
4 years, 1 month ago (2016-10-26 23:07:44 UTC) #101
lunalu1
https://codereview.chromium.org/2391883006/diff/400001/content/browser/screen_orientation/screen_orientation_impl.cc File content/browser/screen_orientation/screen_orientation_impl.cc (right): https://codereview.chromium.org/2391883006/diff/400001/content/browser/screen_orientation/screen_orientation_impl.cc#newcode70 content/browser/screen_orientation/screen_orientation_impl.cc:70: binding_.GetCurrentTargetFrame() != web_contents_->GetMainFrame()) On 2016/10/26 21:59:54, Ken Rockot wrote: ...
4 years, 1 month ago (2016-10-27 22:22:26 UTC) #102
lunalu1
I removed the four lines as Colin suggested and re-verified that mojo and IPC messages ...
4 years, 1 month ago (2016-10-28 19:04:13 UTC) #105
blundell
Hi Luna, Thanks! It looks like you still need to address the comments I left ...
4 years, 1 month ago (2016-10-28 21:21:32 UTC) #108
lunalu1
Thanks for reviewing my CL Colin, I have made the changes according to your comments. ...
4 years, 1 month ago (2016-10-31 18:02:54 UTC) #117
blundell
Hi Luna, It looks like you still need to address most of my comments from ...
4 years, 1 month ago (2016-10-31 22:16:22 UTC) #124
lunalu1
@blundell, thanks for reviewing my code. I have made all the changes based on your ...
4 years, 1 month ago (2016-11-03 23:15:26 UTC) #140
chromium-reviews
Sorry forgot to mention, the org.chromium.chrome.browser.webapps.ManifestUpgradeDetectorTest#testCanonicalUrlsIdenticalShouldNotUpgrade keeps failing (I tried to run it a few ...
4 years, 1 month ago (2016-11-03 23:18:42 UTC) #141
pkotwicz
Thanks iclelland@ for reaching out to me about the confusing ManifestUpgradeDetectorTest_testCanonicalUrlsIdenticalShouldNotUpgrade test failure. Thankfully debugging ...
4 years, 1 month ago (2016-11-04 17:44:34 UTC) #142
pkotwicz
Thanks iclelland@ for reaching out to me about the confusing ManifestUpgradeDetectorTest_testCanonicalUrlsIdenticalShouldNotUpgrade test failure. Thankfully debugging ...
4 years, 1 month ago (2016-11-04 17:44:41 UTC) #143
blundell
On 2016/11/04 17:44:41, pkotwicz wrote: > Thanks iclelland@ for reaching out to me about the ...
4 years, 1 month ago (2016-11-07 13:10:23 UTC) #144
blundell
https://codereview.chromium.org/2391883006/diff/520001/content/browser/screen_orientation/screen_orientation.cc File content/browser/screen_orientation/screen_orientation.cc (right): https://codereview.chromium.org/2391883006/diff/520001/content/browser/screen_orientation/screen_orientation.cc#newcode19 content/browser/screen_orientation/screen_orientation.cc:19: weak_factory_(this) { nit: I don't think you need this ...
4 years, 1 month ago (2016-11-07 13:10:54 UTC) #145
blundell
mlamouri@: To be explicit, could you review all of the changes to screen orientation directories ...
4 years, 1 month ago (2016-11-07 13:11:54 UTC) #146
lunalu1
Hi tsepez@, could you please review my changes in content/common/screen_orientation_interface.mojom content/common/screen_orientation_messages.h third_party/WebKit/public/platform/modules/screen_orientation/screen_orientation.mojom and pfeldman@, could ...
4 years, 1 month ago (2016-11-07 21:02:47 UTC) #152
Tom Sepez
mojom/messages LGTM.
4 years, 1 month ago (2016-11-07 21:05:55 UTC) #153
mlamouri (slow - plz ping)
First pass. It's a huge CL with a lot of changes so it might require ...
4 years, 1 month ago (2016-11-13 00:26:36 UTC) #155
Tom Sepez
mojom/messages LGTM.
4 years, 1 month ago (2016-11-15 19:27:39 UTC) #168
lunalu1
Hi mlamouri@, thanks for reviewing my CL. I have made the changes you suggested. Please ...
4 years, 1 month ago (2016-11-16 18:46:59 UTC) #175
mlamouri (slow - plz ping)
Still have a few comments but I will be OOO for a week so lgtm ...
4 years, 1 month ago (2016-11-18 14:51:20 UTC) #180
lunalu1
Hi, thanks for reviewing my CL. I have made the changes based on the comments. ...
4 years, 1 month ago (2016-11-21 20:23:52 UTC) #183
pfeldman
lgtm % comments https://codereview.chromium.org/2391883006/diff/620001/content/browser/screen_orientation/screen_orientation.cc File content/browser/screen_orientation/screen_orientation.cc (right): https://codereview.chromium.org/2391883006/diff/620001/content/browser/screen_orientation/screen_orientation.cc#newcode35 content/browser/screen_orientation/screen_orientation.cc:35: if (!provider_) { This is never ...
4 years, 1 month ago (2016-11-21 21:30:26 UTC) #186
lunalu1
Done. Thanks https://codereview.chromium.org/2391883006/diff/620001/content/browser/screen_orientation/screen_orientation.cc File content/browser/screen_orientation/screen_orientation.cc (right): https://codereview.chromium.org/2391883006/diff/620001/content/browser/screen_orientation/screen_orientation.cc#newcode35 content/browser/screen_orientation/screen_orientation.cc:35: if (!provider_) { On 2016/11/21 21:30:25, pfeldman ...
4 years, 1 month ago (2016-11-21 21:40:51 UTC) #187
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/2391883006/640001
4 years, 1 month ago (2016-11-21 21:42:05 UTC) #190
commit-bot: I haz the power
Committed patchset #13 (id:640001)
4 years, 1 month ago (2016-11-22 00:27:55 UTC) #192
commit-bot: I haz the power
4 years, 1 month ago (2016-11-22 00:30:49 UTC) #194
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/d4a2cc818e19f277ea030e98cd86c477740ed1a6
Cr-Commit-Position: refs/heads/master@{#433714}

Powered by Google App Engine
This is Rietveld 408576698