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

Issue 1231083007: Expose distiller functions to JavaScript (Closed)

Created:
5 years, 5 months ago by mdjones
Modified:
5 years, 2 months ago
CC:
Aaron Boodman, abarth-chromium, ben+mojo_chromium.org, chromium-reviews, darin (slow to review), darin-cc_chromium.org, jam, mkwst+moarreviews-renderer_chromium.org, mlamouri+watch-content_chromium.org, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org
Base URL:
https://chromium.googlesource.com/chromium/src.git@refactor-content
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Expose distiller functions to JavaScript This change adds two mojo services; one for notifying a RenderFrame that it is working on a distiller page and one for allowing distiller JavaScript functions to access the browser. This CL only exposes a single function "distiller.echo". BUG= Committed: https://crrev.com/c5fc07ec3016dc3fb0d58c6869f1fc9bedb8b3a7 Cr-Commit-Position: refs/heads/master@{#347951}

Patch Set 1 #

Patch Set 2 : clean up #

Patch Set 3 : Remove logging include #

Patch Set 4 : weak pointer for observer #

Patch Set 5 : Separate build targets and tests #

Patch Set 6 : cl format #

Total comments: 12

Patch Set 7 : Everything is in an isolated world #

Patch Set 8 : Function rename and remove unnecessary code #

Total comments: 2

Patch Set 9 : Clean up #

Total comments: 12

Patch Set 10 : Address comments #

Total comments: 19

Patch Set 11 : Comments #

Patch Set 12 : Comment for test util #

Total comments: 2

Patch Set 13 : Update to use StrongBinding and rebase #

Total comments: 6

Patch Set 14 : Move dependencies to correct files #

Unified diffs Side-by-side diffs Delta from patch set Stats (+666 lines, -11 lines) Patch
M chrome/browser/dom_distiller/dom_distiller_viewer_source_browsertest.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +66 lines, -1 line 0 comments Download
M chrome/chrome_renderer.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +1 line, -0 lines 0 comments Download
M chrome/renderer/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 13 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/renderer/chrome_content_renderer_client.cc View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +6 lines, -0 lines 0 comments Download
M chrome/test/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +1 line, -0 lines 0 comments Download
M components/components_tests.gyp View 1 2 3 4 5 6 7 8 9 10 11 12 13 2 chunks +2 lines, -0 lines 0 comments Download
M components/dom_distiller.gypi View 1 2 3 4 5 6 7 8 9 10 4 chunks +44 lines, -2 lines 0 comments Download
M components/dom_distiller/content/BUILD.gn View 1 2 3 4 5 6 7 8 9 10 11 12 3 chunks +40 lines, -2 lines 0 comments Download
A + components/dom_distiller/content/browser/DEPS View 1 chunk +0 lines, -1 line 0 comments Download
A components/dom_distiller/content/browser/distiller_javascript_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +34 lines, -0 lines 0 comments Download
A components/dom_distiller/content/browser/distiller_javascript_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +25 lines, -0 lines 0 comments Download
M components/dom_distiller/content/browser/dom_distiller_viewer_source.cc View 1 2 3 4 5 6 7 8 9 10 11 12 5 chunks +20 lines, -4 lines 0 comments Download
A components/dom_distiller/content/common/distiller_javascript_service.mojom View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -0 lines 0 comments Download
A components/dom_distiller/content/common/distiller_page_notifier_service.mojom View 1 2 3 4 5 6 7 8 9 10 1 chunk +11 lines, -0 lines 0 comments Download
A + components/dom_distiller/content/renderer/DEPS View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +3 lines, -1 line 0 comments Download
A components/dom_distiller/content/renderer/distiller_js_render_frame_observer.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +60 lines, -0 lines 0 comments Download
A components/dom_distiller/content/renderer/distiller_js_render_frame_observer.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +67 lines, -0 lines 0 comments Download
A components/dom_distiller/content/renderer/distiller_native_javascript.h View 1 2 3 4 5 6 7 8 9 1 chunk +42 lines, -0 lines 0 comments Download
A components/dom_distiller/content/renderer/distiller_native_javascript.cc View 1 2 3 4 5 6 1 chunk +78 lines, -0 lines 0 comments Download
A components/dom_distiller/content/renderer/distiller_page_notifier_service_impl.h View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +38 lines, -0 lines 0 comments Download
A components/dom_distiller/content/renderer/distiller_page_notifier_service_impl.cc View 1 2 3 4 5 6 7 8 9 10 11 12 1 chunk +26 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.h View 1 2 3 4 5 6 7 8 9 10 11 1 chunk +8 lines, -0 lines 0 comments Download
M content/public/test/browser_test_utils.cc View 1 2 3 4 5 6 7 8 9 10 2 chunks +53 lines, -0 lines 0 comments Download
M content/renderer/dom_automation_controller.h View 1 2 3 4 5 6 1 chunk +3 lines, -0 lines 0 comments Download
M content/renderer/dom_automation_controller.cc View 1 2 3 4 5 6 1 chunk +23 lines, -0 lines 0 comments Download

Depends on Patchset:

Dependent Patchsets:

Messages

Total messages: 32 (8 generated)
mdjones
Still working on the tests, but the rest can be reviewed if you have time ...
5 years, 5 months ago (2015-07-11 02:11:58 UTC) #2
mdjones
On 2015/07/11 02:11:58, mdjones wrote: > Still working on the tests, but the rest can ...
5 years, 5 months ago (2015-07-24 21:41:51 UTC) #3
nyquist
preliminary comments https://codereview.chromium.org/1231083007/diff/100001/chrome/renderer/chrome_content_renderer_client.cc File chrome/renderer/chrome_content_renderer_client.cc (right): https://codereview.chromium.org/1231083007/diff/100001/chrome/renderer/chrome_content_renderer_client.cc#newcode563 chrome/renderer/chrome_content_renderer_client.cc:563: new dom_distiller::DistillerJsRenderFrameObserver(render_frame); When is this deleted? https://codereview.chromium.org/1231083007/diff/100001/components/dom_distiller/content/renderer/distiller_js_render_frame_observer.h ...
5 years, 4 months ago (2015-07-27 21:44:34 UTC) #4
mdjones
Made some changes to the testing utils and added domAutomationController to isolated worlds as they ...
5 years, 4 months ago (2015-07-28 20:53:42 UTC) #5
cjhopman
https://codereview.chromium.org/1231083007/diff/140001/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc File components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc (left): https://codereview.chromium.org/1231083007/diff/140001/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc#oldcode45 components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc:45: embedded_test_server()->GetURL(url), Can we remove all the unrelated style/formatting changes?
5 years, 4 months ago (2015-07-29 00:26:51 UTC) #6
mdjones
https://codereview.chromium.org/1231083007/diff/140001/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc File components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc (left): https://codereview.chromium.org/1231083007/diff/140001/components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc#oldcode45 components/dom_distiller/content/browser/distillable_page_utils_browsertest.cc:45: embedded_test_server()->GetURL(url), On 2015/07/29 00:26:51, cjhopman wrote: > Can we ...
5 years, 4 months ago (2015-07-29 18:36:00 UTC) #7
nyquist
https://codereview.chromium.org/1231083007/diff/160001/components/dom_distiller/content/common/distiller_page_notifier_service.mojom File components/dom_distiller/content/common/distiller_page_notifier_service.mojom (right): https://codereview.chromium.org/1231083007/diff/160001/components/dom_distiller/content/common/distiller_page_notifier_service.mojom#newcode8 components/dom_distiller/content/common/distiller_page_notifier_service.mojom:8: Notify(); What does this notify? https://codereview.chromium.org/1231083007/diff/160001/components/dom_distiller/content/renderer/distiller_js_render_frame_observer.h File components/dom_distiller/content/renderer/distiller_js_render_frame_observer.h (right): ...
5 years, 4 months ago (2015-08-11 08:11:55 UTC) #8
mdjones
https://codereview.chromium.org/1231083007/diff/160001/components/dom_distiller/content/common/distiller_page_notifier_service.mojom File components/dom_distiller/content/common/distiller_page_notifier_service.mojom (right): https://codereview.chromium.org/1231083007/diff/160001/components/dom_distiller/content/common/distiller_page_notifier_service.mojom#newcode8 components/dom_distiller/content/common/distiller_page_notifier_service.mojom:8: Notify(); On 2015/08/11 08:11:55, nyquist wrote: > What does ...
5 years, 4 months ago (2015-08-11 16:02:05 UTC) #9
nyquist
Just a few style-comments and comments about comments... Otherwise lgtm! https://codereview.chromium.org/1231083007/diff/180001/components/dom_distiller.gypi File components/dom_distiller.gypi (right): https://codereview.chromium.org/1231083007/diff/180001/components/dom_distiller.gypi#newcode196 ...
5 years, 4 months ago (2015-08-19 10:59:54 UTC) #10
mdjones
+jochen for chrome and content changes. https://codereview.chromium.org/1231083007/diff/180001/components/dom_distiller.gypi File components/dom_distiller.gypi (right): https://codereview.chromium.org/1231083007/diff/180001/components/dom_distiller.gypi#newcode196 components/dom_distiller.gypi:196: 'dom_distiller_core', On 2015/08/19 ...
5 years, 4 months ago (2015-08-19 20:25:20 UTC) #12
mdjones
+nasko Could you please take a look at the content/chrome changes since jochen is ooo?
5 years, 3 months ago (2015-09-01 15:33:32 UTC) #14
nasko
I'm not the right reviewer for GIN or V8 related code. A drive-by comment though. ...
5 years, 3 months ago (2015-09-02 21:59:40 UTC) #15
mdjones
https://codereview.chromium.org/1231083007/diff/220001/content/public/test/browser_test_utils.cc File content/public/test/browser_test_utils.cc (right): https://codereview.chromium.org/1231083007/diff/220001/content/public/test/browser_test_utils.cc#newcode171 content/public/test/browser_test_utils.cc:171: WARN_UNUSED_RESULT; On 2015/09/02 21:59:40, nasko (slow to review) wrote: ...
5 years, 3 months ago (2015-09-03 01:38:29 UTC) #16
jochen (gone - plz use gerrit)
https://codereview.chromium.org/1231083007/diff/240001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/1231083007/diff/240001/chrome/browser/BUILD.gn#newcode280 chrome/browser/BUILD.gn:280: "//components/dom_distiller/content:content_renderer", browser must not depend on renderer https://codereview.chromium.org/1231083007/diff/240001/chrome/chrome_browser.gypi File ...
5 years, 3 months ago (2015-09-08 12:27:30 UTC) #17
mdjones
https://codereview.chromium.org/1231083007/diff/240001/chrome/browser/BUILD.gn File chrome/browser/BUILD.gn (right): https://codereview.chromium.org/1231083007/diff/240001/chrome/browser/BUILD.gn#newcode280 chrome/browser/BUILD.gn:280: "//components/dom_distiller/content:content_renderer", On 2015/09/08 12:27:30, jochen wrote: > browser must ...
5 years, 3 months ago (2015-09-08 16:32:32 UTC) #18
jochen (gone - plz use gerrit)
lgtm
5 years, 3 months ago (2015-09-09 14:35:22 UTC) #19
commit-bot: I haz the power
Dry run: CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1231083007/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1231083007/260001
5 years, 3 months ago (2015-09-09 15:27:59 UTC) #21
commit-bot: I haz the power
Dry run: This issue passed the CQ dry run.
5 years, 3 months ago (2015-09-09 16:51:43 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1231083007/260001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1231083007/260001
5 years, 3 months ago (2015-09-09 17:06:07 UTC) #26
commit-bot: I haz the power
Committed patchset #14 (id:260001)
5 years, 3 months ago (2015-09-09 17:11:29 UTC) #27
commit-bot: I haz the power
Patchset 14 (id:??) landed as https://crrev.com/c5fc07ec3016dc3fb0d58c6869f1fc9bedb8b3a7 Cr-Commit-Position: refs/heads/master@{#347951}
5 years, 3 months ago (2015-09-09 17:12:12 UTC) #28
stgao
FYI: This CL seems to cause compile failures on Win GN dbg bots. https://findit-for-me.appspot.com/build-failure?url=https://build.chromium.org/p/chromium.win/builders/Win%20x64%20GN%20(dbg)/builds/9325 https://findit-for-me.appspot.com/build-failure?url=https://build.chromium.org/p/chromium.win/builders/Win8%20GN%20(dbg)/builds/12931 ...
5 years, 3 months ago (2015-09-09 21:02:29 UTC) #30
Dan Beam
A revert of this CL (patchset #14 id:260001) has been created in https://codereview.chromium.org/1336433002/ by dbeam@chromium.org. ...
5 years, 3 months ago (2015-09-10 02:22:09 UTC) #31
commit-bot: I haz the power
5 years, 2 months ago (2015-09-23 12:00:44 UTC) #32
Message was sent while issue was closed.
Patchset 14 (id:??) landed as
https://crrev.com/c5fc07ec3016dc3fb0d58c6869f1fc9bedb8b3a7
Cr-Commit-Position: refs/heads/master@{#347951}

Powered by Google App Engine
This is Rietveld 408576698