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

Side by Side Diff: trunk/src/chrome/browser/ui/tab_helpers.cc

Issue 297163003: Revert 272611 "Add support for distilling current WebContents" (Closed) Base URL: svn://svn.chromium.org/chrome/
Patch Set: 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "chrome/browser/ui/tab_helpers.h" 5 #include "chrome/browser/ui/tab_helpers.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "chrome/browser/browser_process.h" 8 #include "chrome/browser/browser_process.h"
9 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 9 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
10 #include "chrome/browser/extensions/tab_helper.h" 10 #include "chrome/browser/extensions/tab_helper.h"
(...skipping 11 matching lines...) Expand all
22 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 22 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
23 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 23 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
24 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 24 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
25 #include "chrome/browser/ui/navigation_correction_tab_observer.h" 25 #include "chrome/browser/ui/navigation_correction_tab_observer.h"
26 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 26 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
27 #include "chrome/browser/ui/search/search_tab_helper.h" 27 #include "chrome/browser/ui/search/search_tab_helper.h"
28 #include "chrome/browser/ui/tab_contents/core_tab_helper.h" 28 #include "chrome/browser/ui/tab_contents/core_tab_helper.h"
29 #include "chrome/common/chrome_switches.h" 29 #include "chrome/common/chrome_switches.h"
30 #include "components/autofill/content/browser/content_autofill_driver.h" 30 #include "components/autofill/content/browser/content_autofill_driver.h"
31 #include "components/autofill/core/browser/autofill_manager.h" 31 #include "components/autofill/core/browser/autofill_manager.h"
32 #include "components/dom_distiller/content/web_contents_main_frame_observer.h"
33 #include "components/password_manager/core/browser/password_manager.h" 32 #include "components/password_manager/core/browser/password_manager.h"
34 #include "content/public/browser/web_contents.h" 33 #include "content/public/browser/web_contents.h"
35 #include "extensions/browser/view_type_utils.h" 34 #include "extensions/browser/view_type_utils.h"
36 35
37 #if defined(OS_ANDROID) 36 #if defined(OS_ANDROID)
38 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h" 37 #include "chrome/browser/android/webapps/single_tab_mode_tab_helper.h"
39 #include "chrome/browser/ui/android/context_menu_helper.h" 38 #include "chrome/browser/ui/android/context_menu_helper.h"
40 #include "chrome/browser/ui/android/window_android_helper.h" 39 #include "chrome/browser/ui/android/window_android_helper.h"
41 #else 40 #else
42 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 41 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
(...skipping 140 matching lines...) Expand 10 before | Expand all | Expand 10 after
183 182
184 #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID) 183 #if defined(ENABLE_PRINTING) && !defined(OS_ANDROID)
185 #if defined(ENABLE_FULL_PRINTING) 184 #if defined(ENABLE_FULL_PRINTING)
186 printing::PrintViewManager::CreateForWebContents(web_contents); 185 printing::PrintViewManager::CreateForWebContents(web_contents);
187 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents); 186 printing::PrintPreviewMessageHandler::CreateForWebContents(web_contents);
188 #else 187 #else
189 printing::PrintViewManagerBasic::CreateForWebContents(web_contents); 188 printing::PrintViewManagerBasic::CreateForWebContents(web_contents);
190 #endif // defined(ENABLE_FULL_PRINTING) 189 #endif // defined(ENABLE_FULL_PRINTING)
191 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID) 190 #endif // defined(ENABLE_PRINTING) && !defined(OS_ANDROID)
192 191
193 if (CommandLine::ForCurrentProcess()->HasSwitch(
194 switches::kEnableDomDistiller)) {
195 dom_distiller::WebContentsMainFrameObserver::CreateForWebContents(
196 web_contents);
197 }
198
199 #if defined(ENABLE_ONE_CLICK_SIGNIN) 192 #if defined(ENABLE_ONE_CLICK_SIGNIN)
200 // If this is not an incognito window, setup to handle one-click login. 193 // If this is not an incognito window, setup to handle one-click login.
201 // We don't want to check that the profile is already connected at this time 194 // We don't want to check that the profile is already connected at this time
202 // because the connected state may change while this tab is open. Having a 195 // because the connected state may change while this tab is open. Having a
203 // one-click signin helper attached does not cause problems if the profile 196 // one-click signin helper attached does not cause problems if the profile
204 // happens to be already connected. 197 // happens to be already connected.
205 if (OneClickSigninHelper::CanOffer(web_contents, 198 if (OneClickSigninHelper::CanOffer(web_contents,
206 OneClickSigninHelper::CAN_OFFER_FOR_ALL, 199 OneClickSigninHelper::CAN_OFFER_FOR_ALL,
207 std::string(), 200 std::string(),
208 NULL)) { 201 NULL)) {
209 OneClickSigninHelper::CreateForWebContentsWithPasswordManager( 202 OneClickSigninHelper::CreateForWebContentsWithPasswordManager(
210 web_contents, 203 web_contents,
211 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); 204 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents));
212 } 205 }
213 #endif 206 #endif
214 } 207 }
OLDNEW
« no previous file with comments | « trunk/src/chrome/browser/dom_distiller/tab_utils_browsertest.cc ('k') | trunk/src/chrome/chrome_browser.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698