|
|
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 ScreenOrientationServiceImpl is per-RenderFrameHost, as
opposed to ScreenOrientationDispatcherHostImpl's being per-WebContents. This
change is due to the fact that the connection established from the renderer
is a per-render frame connection. As a result, ScreenOrientationServiceImpl
does not have to do the muxing of RenderFrameHosts that
ScreenOrientationDispatcherHostImpl did.
- A new ScreenOrientationContext is introduced to provide the per-WebContents
screen orientation context that ScreenOrientationServiceImpl requires (e.g.,
notification of a change in screen orientation).
- Request IDs 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.
This CL does not attempt to decouple the screen orientation service from //
content. Decoupling ScreenOrientationServiceImpl, ScreenOrientationProvider,
and ScreenOrientationContext will be relatively easy: it will just require
some fiddling so that ScreenOrientationProvider::Create() no longer needs to
take a WebContents. Decoupling ScreenOrientationProviderAndroid will be an
interesting exercise, as it looks like there are some real dependencies on
//content that will need to be injected.
TEST=Test that websites using the screen orientation API can still correctly
lock/unlock the screen orientation on Android.
Total comments: 2
Total comments: 4
Total comments: 5
Total comments: 1
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+460 lines, -457 lines) |
Patch |
 |
M |
content/browser/android/content_view_core_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
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
11
|
2 chunks |
+5 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
11
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/browser/frame_host/render_frame_host_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
D |
content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.h
|
View
|
1
2
|
1 chunk |
+0 lines, -70 lines |
0 comments
|
Download
|
 |
D |
content/browser/screen_orientation/screen_orientation_dispatcher_host_impl.cc
|
View
|
1
2
|
1 chunk |
+0 lines, -138 lines |
0 comments
|
Download
|
 |
M |
content/browser/screen_orientation/screen_orientation_provider_android.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
3 chunks |
+16 lines, -13 lines |
0 comments
|
Download
|
 |
M |
content/browser/screen_orientation/screen_orientation_provider_android.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
7 chunks |
+28 lines, -32 lines |
1 comment
|
Download
|
 |
A |
content/browser/screen_orientation/screen_orientation_service_impl.h
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+42 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/browser/screen_orientation/screen_orientation_service_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
10
11
12
|
1 chunk |
+64 lines, -0 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 |
+2 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
|
6 chunks |
+13 lines, -9 lines |
0 comments
|
Download
|
 |
M |
content/common/BUILD.gn
|
View
|
1
2
3
4
5
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/common/screen_orientation_service.mojom
|
View
|
1
2
|
1 chunk |
+15 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/common/screen_orientation_utils.h
|
View
|
1
2
3
|
1 chunk |
+23 lines, -0 lines |
0 comments
|
Download
|
 |
A |
content/common/screen_orientation_utils.cc
|
View
|
1
2
|
1 chunk |
+67 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/content_browser.gypi
|
View
|
1
2
3
4
5
6
7
8
9
10
11
|
2 chunks |
+2 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/content_common.gypi
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/content_common_mojo_bindings.gypi
|
View
|
1
2
|
1 chunk |
+2 lines, -0 lines |
0 comments
|
Download
|
 |
D |
content/public/browser/screen_orientation_dispatcher_host.h
|
View
|
1
2
|
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
11
|
3 chunks |
+12 lines, -10 lines |
0 comments
|
Download
|
 |
A |
content/public/common/screen_orientation.mojom
|
View
|
1
2
|
1 chunk |
+33 lines, -0 lines |
0 comments
|
Download
|
 |
M |
content/renderer/render_frame_impl.h
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+5 lines, -1 line |
0 comments
|
Download
|
 |
M |
content/renderer/render_frame_impl.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+7 lines, -3 lines |
0 comments
|
Download
|
 |
M |
content/renderer/screen_orientation/screen_orientation_dispatcher.h
|
View
|
1
2
3
4
5
6
7
8
9
|
3 chunks |
+8 lines, -10 lines |
0 comments
|
Download
|
 |
M |
content/renderer/screen_orientation/screen_orientation_dispatcher.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
2 chunks |
+33 lines, -32 lines |
0 comments
|
Download
|
 |
M |
content/renderer/screen_orientation/screen_orientation_dispatcher_unittest.cc
|
View
|
1
2
3
4
5
6
7
8
9
|
6 chunks |
+65 lines, -90 lines |
0 comments
|
Download
|
Total messages: 10 (3 generated)
|