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

Issue 831523004: Enable posting a message from JS to Android webview. (Closed)

Created:
5 years, 11 months ago by sgurun-gerrit only
Modified:
5 years, 11 months ago
CC:
android-webview-reviews_chromium.org, chromium-reviews, darin-cc_chromium.org, jam
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Enable posting a message from JS to Android webview. For future CL: queueing messages, sending messages from Java to JS through message channel, transferring ports in message channels, closing channels. BUG=393291 Committed: https://crrev.com/d2a4306024cc3bd6c52c70646ad6ec37f0259622 Cr-Commit-Position: refs/heads/master@{#312922}

Patch Set 1 #

Patch Set 2 : minor cleanup #

Patch Set 3 : Add v8 as a dependency #

Total comments: 2

Patch Set 4 : minor fixes #

Total comments: 20

Patch Set 5 : code review from Mikhail #

Patch Set 6 : Receive messages in a background thread #

Patch Set 7 : rebase #

Patch Set 8 : rebase #

Total comments: 14

Patch Set 9 : Address Mikhail's comments #

Total comments: 6

Patch Set 10 : address code review from Palmer and Mnaganov #

Patch Set 11 : Added browser tests #

Patch Set 12 : added some comments #

Patch Set 13 : fix component builds #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats (+1066 lines, -168 lines) Patch
M android_webview/android_webview.gyp View 1 2 3 4 5 6 7 4 chunks +7 lines, -0 lines 0 comments Download
M android_webview/browser/aw_browser_context.h View 1 2 3 4 5 6 7 8 3 chunks +4 lines, -0 lines 0 comments Download
M android_webview/browser/aw_browser_context.cc View 1 2 3 4 5 6 7 1 chunk +8 lines, -0 lines 0 comments Download
A android_webview/browser/aw_message_port_message_filter.h View 1 2 3 4 5 6 7 8 1 chunk +45 lines, -0 lines 2 comments Download
A android_webview/browser/aw_message_port_message_filter.cc View 1 2 3 4 5 6 7 1 chunk +60 lines, -0 lines 0 comments Download
A android_webview/browser/aw_message_port_service.h View 1 2 3 4 1 chunk +32 lines, -0 lines 0 comments Download
M android_webview/browser/jni_dependency_factory.h View 2 chunks +2 lines, -0 lines 0 comments Download
M android_webview/common/android_webview_message_generator.h View 1 chunk +1 line, -0 lines 0 comments Download
A android_webview/common/aw_message_port_messages.h View 1 2 3 4 5 6 7 8 9 1 chunk +32 lines, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwBrowserContext.java View 2 chunks +8 lines, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/AwContents.java View 1 2 3 4 5 6 7 3 chunks +12 lines, -9 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/AwMessagePortService.java View 1 2 3 4 5 6 7 8 1 chunk +136 lines, -0 lines 0 comments Download
M android_webview/java/src/org/chromium/android_webview/MessageChannel.java View 1 chunk +6 lines, -6 lines 0 comments Download
A android_webview/java/src/org/chromium/android_webview/MessagePort.java View 1 2 3 4 5 1 chunk +46 lines, -0 lines 0 comments Download
M android_webview/javatests/src/org/chromium/android_webview/test/PostMessageTest.java View 1 2 3 4 5 6 7 8 9 6 chunks +66 lines, -10 lines 0 comments Download
M android_webview/lib/main/aw_main_delegate.h View 1 chunk +11 lines, -11 lines 0 comments Download
M android_webview/lib/main/aw_main_delegate.cc View 1 2 3 4 5 6 7 2 chunks +5 lines, -0 lines 0 comments Download
M android_webview/native/android_webview_jni_registrar.cc View 2 chunks +2 lines, -0 lines 0 comments Download
M android_webview/native/aw_contents.h View 3 chunks +3 lines, -0 lines 0 comments Download
M android_webview/native/aw_contents.cc View 1 2 3 4 3 chunks +27 lines, -52 lines 0 comments Download
A android_webview/native/aw_message_port_service_impl.h View 1 2 3 4 1 chunk +65 lines, -0 lines 0 comments Download
A android_webview/native/aw_message_port_service_impl.cc View 1 2 3 4 5 6 7 8 1 chunk +161 lines, -0 lines 0 comments Download
M android_webview/native/webview_native.gyp View 2 chunks +3 lines, -0 lines 0 comments Download
M android_webview/renderer/DEPS View 1 chunk +2 lines, -0 lines 0 comments Download
M android_webview/renderer/aw_content_renderer_client.cc View 1 2 chunks +2 lines, -0 lines 0 comments Download
A android_webview/renderer/aw_message_port_client.h View 1 2 3 4 1 chunk +35 lines, -0 lines 0 comments Download
A android_webview/renderer/aw_message_port_client.cc View 1 2 3 4 1 chunk +70 lines, -0 lines 0 comments Download
D content/browser/message_port_delegate.h View 1 chunk +0 lines, -35 lines 0 comments Download
M content/browser/message_port_message_filter.h View 1 chunk +2 lines, -2 lines 0 comments Download
M content/browser/message_port_provider.cc View 1 2 3 4 1 chunk +49 lines, -31 lines 0 comments Download
A content/browser/message_port_provider_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +142 lines, -0 lines 0 comments Download
M content/browser/message_port_service.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +2 lines, -1 line 0 comments Download
M content/browser/message_port_service.cc View 1 chunk +1 line, -1 line 0 comments Download
M content/browser/navigator_connect/navigator_connect_context.h View 1 chunk +1 line, -1 line 0 comments Download
M content/content_browser.gypi View 1 2 3 4 5 6 7 2 chunks +1 line, -1 line 0 comments Download
M content/content_tests.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
A + content/public/browser/message_port_delegate.h View 4 chunks +6 lines, -5 lines 0 comments Download
M content/public/browser/message_port_provider.h View 1 2 3 4 4 chunks +9 lines, -3 lines 0 comments Download
M ipc/ipc_message_start.h View 1 chunk +1 line, -0 lines 0 comments Download

Messages

Total messages: 44 (8 generated)
sgurun-gerrit only
Ptal. I will add more tests. At the time it does only handle posting string ...
5 years, 11 months ago (2015-01-06 17:57:06 UTC) #2
mnaganov (inactive)
https://codereview.chromium.org/831523004/diff/60001/android_webview/browser/aw_message_port_message_filter.h File android_webview/browser/aw_message_port_message_filter.h (right): https://codereview.chromium.org/831523004/diff/60001/android_webview/browser/aw_message_port_message_filter.h#newcode19 android_webview/browser/aw_message_port_message_filter.h:19: AwMessagePortMessageFilter(int routing_id); explicit AwMessagePortMessageFilter(int route_id) https://codereview.chromium.org/831523004/diff/60001/android_webview/common/aw_message_port_messages.h File android_webview/common/aw_message_port_messages.h (right): ...
5 years, 11 months ago (2015-01-07 11:43:55 UTC) #3
sgurun-gerrit only
https://codereview.chromium.org/831523004/diff/40001/content/browser/message_port_provider.cc File content/browser/message_port_provider.cc (right): https://codereview.chromium.org/831523004/diff/40001/content/browser/message_port_provider.cc#newcode22 content/browser/message_port_provider.cc:22: const base::string16& source_origin, On 2015/01/06 17:57:06, sgurun wrote: > ...
5 years, 11 months ago (2015-01-10 02:36:29 UTC) #4
sgurun-gerrit only
On 2015/01/10 02:36:29, sgurun wrote: > https://codereview.chromium.org/831523004/diff/40001/content/browser/message_port_provider.cc > File content/browser/message_port_provider.cc (right): > > https://codereview.chromium.org/831523004/diff/40001/content/browser/message_port_provider.cc#newcode22 > ...
5 years, 11 months ago (2015-01-10 02:37:56 UTC) #6
sgurun-gerrit only
On 2015/01/10 02:37:56, sgurun wrote: > On 2015/01/10 02:36:29, sgurun wrote: > > > https://codereview.chromium.org/831523004/diff/40001/content/browser/message_port_provider.cc ...
5 years, 11 months ago (2015-01-10 02:39:56 UTC) #8
sgurun-gerrit only
On 2015/01/10 02:39:56, sgurun wrote: > On 2015/01/10 02:37:56, sgurun wrote: > > On 2015/01/10 ...
5 years, 11 months ago (2015-01-13 00:39:19 UTC) #10
mnaganov (inactive)
No issues, except for formatting and naming, so LGTM. Are you planning adding a test ...
5 years, 11 months ago (2015-01-13 10:37:51 UTC) #11
jochen (gone - plz use gerrit)
can you add an implementation of the API to content shell and add a content ...
5 years, 11 months ago (2015-01-13 15:08:11 UTC) #12
sgurun-gerrit only
addressed Mikhail's comments. Note that I modified the existing test to wait in UI thread ...
5 years, 11 months ago (2015-01-14 23:53:13 UTC) #13
mnaganov (inactive)
Still LGTM! https://codereview.chromium.org/831523004/diff/160001/android_webview/browser/aw_message_port_message_filter.h File android_webview/browser/aw_message_port_message_filter.h (right): https://codereview.chromium.org/831523004/diff/160001/android_webview/browser/aw_message_port_message_filter.h#newcode30 android_webview/browser/aw_message_port_message_filter.h:30: void SendMessagesAreQueued(int route_id) override; On 2015/01/14 23:53:13, ...
5 years, 11 months ago (2015-01-15 09:49:33 UTC) #14
palmer
https://codereview.chromium.org/831523004/diff/180001/android_webview/common/aw_message_port_messages.h File android_webview/common/aw_message_port_messages.h (right): https://codereview.chromium.org/831523004/diff/180001/android_webview/common/aw_message_port_messages.h#newcode18 android_webview/common/aw_message_port_messages.h:18: // format to a base::Value. Due to the complexities ...
5 years, 11 months ago (2015-01-15 20:31:51 UTC) #15
sgurun-gerrit only
https://codereview.chromium.org/831523004/diff/180001/android_webview/common/aw_message_port_messages.h File android_webview/common/aw_message_port_messages.h (right): https://codereview.chromium.org/831523004/diff/180001/android_webview/common/aw_message_port_messages.h#newcode18 android_webview/common/aw_message_port_messages.h:18: // format to a base::Value. Due to the complexities ...
5 years, 11 months ago (2015-01-15 21:21:32 UTC) #16
sgurun-gerrit only
Jochen: I added browser tests to verify the functionality of message port provider. I will ...
5 years, 11 months ago (2015-01-16 02:40:44 UTC) #17
sgurun-gerrit only
On 2015/01/16 02:40:44, sgurun wrote: > Jochen: I added browser tests to verify the functionality ...
5 years, 11 months ago (2015-01-16 08:09:52 UTC) #18
mnaganov (inactive)
On 2015/01/16 08:09:52, sgurun wrote: > On 2015/01/16 02:40:44, sgurun wrote: > > Jochen: I ...
5 years, 11 months ago (2015-01-16 10:06:15 UTC) #19
sgurun-gerrit only
On 2015/01/16 10:06:15, mnaganov (cr) wrote: > On 2015/01/16 08:09:52, sgurun wrote: > > On ...
5 years, 11 months ago (2015-01-16 17:42:55 UTC) #20
jochen (gone - plz use gerrit)
thanks for the test. One more question: is it possible to also test the other ...
5 years, 11 months ago (2015-01-19 12:47:57 UTC) #21
mnaganov (inactive)
On 2015/01/19 12:47:57, jochen (slow) wrote: > thanks for the test. One more question: is ...
5 years, 11 months ago (2015-01-19 13:27:10 UTC) #22
jochen (gone - plz use gerrit)
right, but that's a webview test, right? How much effort is it to add a ...
5 years, 11 months ago (2015-01-19 13:32:17 UTC) #23
mnaganov (inactive)
On 2015/01/19 13:32:17, jochen (slow) wrote: > right, but that's a webview test, right? How ...
5 years, 11 months ago (2015-01-19 13:47:37 UTC) #24
sgurun-gerrit only
On 2015/01/19 13:47:37, mnaganov (cr) wrote: > On 2015/01/19 13:32:17, jochen (slow) wrote: > > ...
5 years, 11 months ago (2015-01-19 18:23:14 UTC) #25
jochen (gone - plz use gerrit)
On 2015/01/19 at 18:23:14, sgurun wrote: > On 2015/01/19 13:47:37, mnaganov (cr) wrote: > > ...
5 years, 11 months ago (2015-01-20 15:54:50 UTC) #26
sgurun-gerrit only
On 2015/01/20 15:54:50, jochen (slow) wrote: > On 2015/01/19 at 18:23:14, sgurun wrote: > > ...
5 years, 11 months ago (2015-01-20 17:48:22 UTC) #27
palmer
https://codereview.chromium.org/831523004/diff/260001/android_webview/browser/aw_message_port_message_filter.h File android_webview/browser/aw_message_port_message_filter.h (right): https://codereview.chromium.org/831523004/diff/260001/android_webview/browser/aw_message_port_message_filter.h#newcode28 android_webview/browser/aw_message_port_message_filter.h:28: const base::string16& message, I don't quite believe :) that ...
5 years, 11 months ago (2015-01-21 01:56:19 UTC) #28
sgurun-gerrit only
https://codereview.chromium.org/831523004/diff/260001/android_webview/browser/aw_message_port_message_filter.h File android_webview/browser/aw_message_port_message_filter.h (right): https://codereview.chromium.org/831523004/diff/260001/android_webview/browser/aw_message_port_message_filter.h#newcode28 android_webview/browser/aw_message_port_message_filter.h:28: const base::string16& message, On 2015/01/21 01:56:19, Chromium Palmer wrote: ...
5 years, 11 months ago (2015-01-21 02:25:54 UTC) #29
sgurun-gerrit only
nasko: please review ipc/ and android_webview/common/ palmer: I figured you may not have enough bandwidth ...
5 years, 11 months ago (2015-01-22 16:09:55 UTC) #31
palmer
Yeah, it's probably better for someone else to pick this up. I am pretty full ...
5 years, 11 months ago (2015-01-22 19:46:22 UTC) #32
nasko
Unfortunately, I'm in the same boat as Chris. We are running an event next week ...
5 years, 11 months ago (2015-01-23 17:01:08 UTC) #34
sgurun-gerrit only
On 2015/01/23 17:01:08, nasko (very slow until 02-02) wrote: > Unfortunately, I'm in the same ...
5 years, 11 months ago (2015-01-23 17:06:32 UTC) #35
sgurun-gerrit only
tsepez: can you please review ipc/ and android_webview/common. Thanks!
5 years, 11 months ago (2015-01-23 17:11:25 UTC) #37
Tom Sepez
The ipc/ and android_webview/common implementations look fine, the question I have is what is the ...
5 years, 11 months ago (2015-01-23 17:30:58 UTC) #38
sgurun-gerrit only
On 2015/01/23 17:30:58, Tom Sepez wrote: > The ipc/ and android_webview/common implementations look fine, the ...
5 years, 11 months ago (2015-01-23 18:59:42 UTC) #39
Tom Sepez
Ok. That seems reasonable. LGTM.
5 years, 11 months ago (2015-01-23 19:03:58 UTC) #40
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/831523004/260001
5 years, 11 months ago (2015-01-23 19:06:33 UTC) #42
commit-bot: I haz the power
Committed patchset #13 (id:260001)
5 years, 11 months ago (2015-01-23 20:54:37 UTC) #43
commit-bot: I haz the power
5 years, 11 months ago (2015-01-23 20:56:00 UTC) #44
Message was sent while issue was closed.
Patchset 13 (id:??) landed as
https://crrev.com/d2a4306024cc3bd6c52c70646ad6ec37f0259622
Cr-Commit-Position: refs/heads/master@{#312922}

Powered by Google App Engine
This is Rietveld 408576698