diff options
author | nyquist@chromium.org <nyquist@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-28 01:24:12 +0000 |
---|---|---|
committer | nyquist@chromium.org <nyquist@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-05-28 01:24:12 +0000 |
commit | d289bd7f55ca3d3f647a0a2c6049115e0125b5df (patch) | |
tree | 87d1b6c64b2d775a5bf07fed9cb2e1fed94a76b1 /chrome/browser/ui/tab_helpers.cc | |
parent | d2b20dd909486a7c78a76ddf0d0d13410c969ffe (diff) | |
download | chromium_src-d289bd7f55ca3d3f647a0a2c6049115e0125b5df.zip chromium_src-d289bd7f55ca3d3f647a0a2c6049115e0125b5df.tar.gz chromium_src-d289bd7f55ca3d3f647a0a2c6049115e0125b5df.tar.bz2 |
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
Review URL: https://codereview.chromium.org/266073003
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273101 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/ui/tab_helpers.cc')
-rw-r--r-- | chrome/browser/ui/tab_helpers.cc | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc index c4539c8..abdad85 100644 --- a/chrome/browser/ui/tab_helpers.cc +++ b/chrome/browser/ui/tab_helpers.cc @@ -29,6 +29,7 @@ #include "chrome/common/chrome_switches.h" #include "components/autofill/content/browser/content_autofill_driver.h" #include "components/autofill/core/browser/autofill_manager.h" +#include "components/dom_distiller/content/web_contents_main_frame_observer.h" #include "components/password_manager/core/browser/password_manager.h" #include "content/public/browser/web_contents.h" #include "extensions/browser/view_type_utils.h" @@ -189,6 +190,12 @@ void TabHelpers::AttachTabHelpers(WebContents* web_contents) { #endif // defined(ENABLE_FULL_PRINTING) #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID) + if (CommandLine::ForCurrentProcess()->HasSwitch( + switches::kEnableDomDistiller)) { + dom_distiller::WebContentsMainFrameObserver::CreateForWebContents( + web_contents); + } + #if defined(ENABLE_ONE_CLICK_SIGNIN) // If this is not an incognito window, setup to handle one-click login. // We don't want to check that the profile is already connected at this time |