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

Issue 266073003: Add support for distilling current WebContents (Closed)

Created:
6 years, 7 months ago by nyquist
Modified:
6 years, 7 months ago
Reviewers:
Yaron, sadrul, sky
CC:
chromium-reviews, darin-cc_chromium.org, nasko+codewatch_chromium.org, jam, creis+watch_chromium.org, miu+watch_chromium.org
Visibility:
Public.

Description

Add support for distilling current WebContents This CL adds the utilities needed for using the current WebContents when distilling web pages. BUG=361939 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=272611 Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=273101

Patch Set 1 #

Total comments: 11

Patch Set 2 : Changed to use WebContentsUserData #

Patch Set 3 : Fixed some nits #

Patch Set 4 : Rebased #

Patch Set 5 : Added comment #

Total comments: 6

Patch Set 6 : Addressed all comments and added tests. Also removed the timeout for the view request delegate. #

Total comments: 4

Patch Set 7 : Fixed compile on Windows and rebased to ensure mac build works too #

Total comments: 14

Patch Set 8 : Addressed all comments #

Patch Set 9 : Rebased #

Patch Set 10 : Wait for correct scheme when running test. #

Patch Set 11 : Rebased #

Unified diffs Side-by-side diffs Delta from patch set Stats (+798 lines, -30 lines) Patch
A chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java View 1 2 3 4 5 6 7 1 chunk +31 lines, -0 lines 0 comments Download
M chrome/browser/android/chrome_jni_registrar.cc View 1 2 3 4 5 6 7 2 chunks +2 lines, -0 lines 0 comments Download
M chrome/browser/dom_distiller/lazy_dom_distiller_service.h View 1 chunk +2 lines, -0 lines 0 comments Download
M chrome/browser/dom_distiller/lazy_dom_distiller_service.cc View 2 chunks +7 lines, -0 lines 0 comments Download
A chrome/browser/dom_distiller/tab_utils.h View 1 2 3 4 5 6 7 1 chunk +17 lines, -0 lines 0 comments Download
A chrome/browser/dom_distiller/tab_utils.cc View 1 2 3 4 5 6 7 1 chunk +160 lines, -0 lines 0 comments Download
A chrome/browser/dom_distiller/tab_utils_android.h View 1 2 3 4 5 6 7 1 chunk +13 lines, -0 lines 0 comments Download
A chrome/browser/dom_distiller/tab_utils_android.cc View 1 2 3 4 5 6 7 1 chunk +27 lines, -0 lines 0 comments Download
A chrome/browser/dom_distiller/tab_utils_browsertest.cc View 1 2 3 4 5 6 7 8 9 1 chunk +91 lines, -0 lines 0 comments Download
M chrome/browser/ui/tab_helpers.cc View 1 2 3 4 5 6 7 8 2 chunks +7 lines, -0 lines 0 comments Download
M chrome/chrome_browser.gypi View 1 2 3 4 5 6 7 8 9 10 2 chunks +5 lines, -0 lines 0 comments Download
M chrome/chrome_tests.gypi View 1 2 3 4 5 6 7 8 9 10 1 chunk +1 line, -0 lines 0 comments Download
A + chrome/test/data/dom_distiller/simple_article.html View 1 2 3 4 5 1 chunk +0 lines, -9 lines 0 comments Download
M components/dom_distiller.gypi View 1 2 3 4 5 6 7 8 9 1 chunk +2 lines, -0 lines 0 comments Download
M components/dom_distiller/content/distiller_page_web_contents.h View 1 2 3 4 5 5 chunks +23 lines, -2 lines 0 comments Download
M components/dom_distiller/content/distiller_page_web_contents.cc View 1 2 3 4 5 5 chunks +64 lines, -7 lines 0 comments Download
M components/dom_distiller/content/distiller_page_web_contents_browsertest.cc View 1 2 3 4 5 6 7 8 9 7 chunks +194 lines, -7 lines 0 comments Download
A components/dom_distiller/content/web_contents_main_frame_observer.h View 1 2 3 4 5 1 chunk +63 lines, -0 lines 0 comments Download
A components/dom_distiller/content/web_contents_main_frame_observer.cc View 1 2 3 4 5 6 7 1 chunk +61 lines, -0 lines 0 comments Download
M components/dom_distiller/core/distiller_page.h View 1 2 3 4 5 6 7 8 9 3 chunks +7 lines, -4 lines 0 comments Download
M components/dom_distiller/core/dom_distiller_service.h View 2 chunks +4 lines, -0 lines 0 comments Download
M components/dom_distiller/core/dom_distiller_service.cc View 2 chunks +9 lines, -1 line 0 comments Download
M components/dom_distiller/core/fake_distiller_page.h View 1 1 chunk +4 lines, -0 lines 0 comments Download
M components/dom_distiller/core/viewer_unittest.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download

Messages

Total messages: 32 (0 generated)
nyquist
yfriedman: PTAL for a first pass. Also, see UI hooks here: https://codereview.chromium.org/269723009/
6 years, 7 months ago (2014-05-03 00:07:17 UTC) #1
Yaron
https://codereview.chromium.org/266073003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java (right): https://codereview.chromium.org/266073003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java#newcode27 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java:27: public static void distillCurrentPageAndView(Tab tab) { Just pass WebContents ...
6 years, 7 months ago (2014-05-06 00:23:20 UTC) #2
nyquist
https://codereview.chromium.org/266073003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java File chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java (right): https://codereview.chromium.org/266073003/diff/1/chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java#newcode27 chrome/android/java/src/org/chromium/chrome/browser/dom_distiller/DomDistillerTabUtils.java:27: public static void distillCurrentPageAndView(Tab tab) { On 2014/05/06 00:23:20, ...
6 years, 7 months ago (2014-05-06 03:52:26 UTC) #3
nyquist
Addressed all comments, and changed to use WebContentsUserData, registered together with other tab helpers. yfriedman: ...
6 years, 7 months ago (2014-05-15 10:15:35 UTC) #4
Yaron
https://codereview.chromium.org/266073003/diff/80001/chrome/browser/dom_distiller/tab_utils_android.cc File chrome/browser/dom_distiller/tab_utils_android.cc (right): https://codereview.chromium.org/266073003/diff/80001/chrome/browser/dom_distiller/tab_utils_android.cc#newcode19 chrome/browser/dom_distiller/tab_utils_android.cc:19: void DistillCurrentPageAndViewJava(JNIEnv* env, nit: remove "Java" from the name ...
6 years, 7 months ago (2014-05-16 02:02:49 UTC) #5
nyquist
yfriedman: PTAL https://codereview.chromium.org/266073003/diff/80001/chrome/browser/dom_distiller/tab_utils_android.cc File chrome/browser/dom_distiller/tab_utils_android.cc (right): https://codereview.chromium.org/266073003/diff/80001/chrome/browser/dom_distiller/tab_utils_android.cc#newcode19 chrome/browser/dom_distiller/tab_utils_android.cc:19: void DistillCurrentPageAndViewJava(JNIEnv* env, On 2014/05/16 02:02:49, Yaron ...
6 years, 7 months ago (2014-05-20 19:58:36 UTC) #6
nyquist
sky: PTAL chrome/browser/ui
6 years, 7 months ago (2014-05-20 20:08:10 UTC) #7
sky
https://codereview.chromium.org/266073003/diff/100001/chrome/browser/ui/tab_helpers.cc File chrome/browser/ui/tab_helpers.cc (right): https://codereview.chromium.org/266073003/diff/100001/chrome/browser/ui/tab_helpers.cc#newcode197 chrome/browser/ui/tab_helpers.cc:197: dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( Why do we need to do this here? ...
6 years, 7 months ago (2014-05-20 20:59:44 UTC) #8
nyquist
https://codereview.chromium.org/266073003/diff/100001/chrome/browser/ui/tab_helpers.cc File chrome/browser/ui/tab_helpers.cc (right): https://codereview.chromium.org/266073003/diff/100001/chrome/browser/ui/tab_helpers.cc#newcode197 chrome/browser/ui/tab_helpers.cc:197: dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( On 2014/05/20 20:59:45, sky wrote: > Why do ...
6 years, 7 months ago (2014-05-20 21:03:27 UTC) #9
sky
https://codereview.chromium.org/266073003/diff/100001/chrome/browser/ui/tab_helpers.cc File chrome/browser/ui/tab_helpers.cc (right): https://codereview.chromium.org/266073003/diff/100001/chrome/browser/ui/tab_helpers.cc#newcode197 chrome/browser/ui/tab_helpers.cc:197: dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( On 2014/05/20 21:03:28, nyquist wrote: > On 2014/05/20 ...
6 years, 7 months ago (2014-05-20 23:25:20 UTC) #10
nyquist
https://codereview.chromium.org/266073003/diff/100001/chrome/browser/ui/tab_helpers.cc File chrome/browser/ui/tab_helpers.cc (right): https://codereview.chromium.org/266073003/diff/100001/chrome/browser/ui/tab_helpers.cc#newcode197 chrome/browser/ui/tab_helpers.cc:197: dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( On 2014/05/20 23:25:20, sky wrote: > On 2014/05/20 ...
6 years, 7 months ago (2014-05-20 23:28:10 UTC) #11
sky
On Tue, May 20, 2014 at 4:28 PM, <nyquist@chromium.org> wrote: > > https://codereview.chromium.org/266073003/diff/100001/chrome/browser/ui/tab_helpers.cc > File ...
6 years, 7 months ago (2014-05-21 21:39:46 UTC) #12
Yaron
dom_distiller aspects lgtm sky: Tommy had originally talked to jam about adding that state to ...
6 years, 7 months ago (2014-05-22 18:25:01 UTC) #13
sky
Darin said this is the best way now:( So, LGTM https://codereview.chromium.org/266073003/diff/120001/chrome/browser/dom_distiller/tab_utils.h File chrome/browser/dom_distiller/tab_utils.h (right): https://codereview.chromium.org/266073003/diff/120001/chrome/browser/dom_distiller/tab_utils.h#newcode12 ...
6 years, 7 months ago (2014-05-22 19:50:40 UTC) #14
nyquist
https://codereview.chromium.org/266073003/diff/120001/chrome/browser/dom_distiller/tab_utils.cc File chrome/browser/dom_distiller/tab_utils.cc (right): https://codereview.chromium.org/266073003/diff/120001/chrome/browser/dom_distiller/tab_utils.cc#newcode104 chrome/browser/dom_distiller/tab_utils.cc:104: content::NavigationController::LoadURLParams params(viewer_url); On 2014/05/22 18:25:02, Yaron wrote: > I ...
6 years, 7 months ago (2014-05-22 23:00:54 UTC) #15
nyquist
The CQ bit was checked by nyquist@chromium.org
6 years, 7 months ago (2014-05-22 23:01:06 UTC) #16
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nyquist@chromium.org/266073003/160001
6 years, 7 months ago (2014-05-22 23:02:31 UTC) #17
nyquist
The CQ bit was unchecked by nyquist@chromium.org
6 years, 7 months ago (2014-05-22 23:26:10 UTC) #18
nyquist
The CQ bit was checked by nyquist@chromium.org
6 years, 7 months ago (2014-05-23 06:52:43 UTC) #19
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nyquist@chromium.org/266073003/160001
6 years, 7 months ago (2014-05-23 06:54:27 UTC) #20
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-23 11:43:00 UTC) #21
commit-bot: I haz the power
The CQ bit was unchecked by commit-bot@chromium.org
6 years, 7 months ago (2014-05-23 14:05:37 UTC) #22
commit-bot: I haz the power
Try jobs failed on following builders: mac_chromium_rel on tryserver.chromium (http://build.chromium.org/p/tryserver.chromium/builders/mac_chromium_rel/builds/32001)
6 years, 7 months ago (2014-05-23 14:05:37 UTC) #23
nyquist
The CQ bit was checked by nyquist@chromium.org
6 years, 7 months ago (2014-05-23 15:13:49 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nyquist@chromium.org/266073003/160001
6 years, 7 months ago (2014-05-23 15:14:10 UTC) #25
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). Please consider checking whether the failures are ...
6 years, 7 months ago (2014-05-23 20:05:07 UTC) #26
commit-bot: I haz the power
Change committed as 272611
6 years, 7 months ago (2014-05-23 22:11:35 UTC) #27
sadrul
Hi. This CL has been reverted in r272704 because the test added this patch is ...
6 years, 7 months ago (2014-05-24 05:44:10 UTC) #28
nyquist
The CQ bit was checked by nyquist@chromium.org
6 years, 7 months ago (2014-05-27 20:38:40 UTC) #29
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/nyquist@chromium.org/266073003/200001
6 years, 7 months ago (2014-05-27 20:39:39 UTC) #30
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: android_dbg_triggered_tests on tryserver.chromium ...
6 years, 7 months ago (2014-05-27 23:51:02 UTC) #31
commit-bot: I haz the power
6 years, 7 months ago (2014-05-28 01:24:17 UTC) #32
Message was sent while issue was closed.
Change committed as 273101

Powered by Google App Engine
This is Rietveld 408576698