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

Unified Diff: chrome/browser/ui/tab_helpers.cc

Issue 266073003: Add support for distilling current WebContents (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed all comments and added tests. Also removed the timeout for the view request delegate. Created 6 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « chrome/browser/dom_distiller/tab_utils_browsertest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/tab_helpers.cc
diff --git a/chrome/browser/ui/tab_helpers.cc b/chrome/browser/ui/tab_helpers.cc
index 05924e3767b77f4e4895d89d4a3ee6383fd11f32..5bdbb2f5a39d135717d3055a0315fd10d97b6dfd 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"
@@ -191,6 +192,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(
sky 2014/05/20 20:59:45 Why do we need to do this here? Can't you install
nyquist 2014/05/20 21:03:28 The WebContentsMainFrameObserver is only there to
sky 2014/05/20 23:25:20 Can't you determine what you need at the time you
nyquist 2014/05/20 23:28:11 That would be great, but I could not find any plac
+ 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
« no previous file with comments | « chrome/browser/dom_distiller/tab_utils_browsertest.cc ('k') | chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698