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

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

Issue 289863005: [Mac] Maximise timer slack for background tabs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Initial review 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"
11 #include "chrome/browser/favicon/favicon_tab_helper.h" 11 #include "chrome/browser/favicon/favicon_tab_helper.h"
12 #include "chrome/browser/history/history_tab_helper.h" 12 #include "chrome/browser/history/history_tab_helper.h"
13 #include "chrome/browser/infobars/infobar_service.h" 13 #include "chrome/browser/infobars/infobar_service.h"
14 #include "chrome/browser/net/net_error_tab_helper.h" 14 #include "chrome/browser/net/net_error_tab_helper.h"
15 #include "chrome/browser/password_manager/chrome_password_manager_client.h" 15 #include "chrome/browser/password_manager/chrome_password_manager_client.h"
16 #include "chrome/browser/prerender/prerender_tab_helper.h" 16 #include "chrome/browser/prerender/prerender_tab_helper.h"
17 #include "chrome/browser/resource_throttle.h"
17 #include "chrome/browser/sessions/session_tab_helper.h" 18 #include "chrome/browser/sessions/session_tab_helper.h"
18 #include "chrome/browser/ssl/ssl_tab_helper.h" 19 #include "chrome/browser/ssl/ssl_tab_helper.h"
19 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h" 20 #include "chrome/browser/tab_contents/navigation_metrics_recorder.h"
20 #include "chrome/browser/translate/translate_tab_helper.h" 21 #include "chrome/browser/translate/translate_tab_helper.h"
21 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h" 22 #include "chrome/browser/ui/autofill/tab_autofill_manager_delegate.h"
22 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h" 23 #include "chrome/browser/ui/blocked_content/popup_blocker_tab_helper.h"
23 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h" 24 #include "chrome/browser/ui/bookmarks/bookmark_tab_helper.h"
24 #include "chrome/browser/ui/find_bar/find_tab_helper.h" 25 #include "chrome/browser/ui/find_bar/find_tab_helper.h"
25 #include "chrome/browser/ui/navigation_correction_tab_observer.h" 26 #include "chrome/browser/ui/navigation_correction_tab_observer.h"
26 #include "chrome/browser/ui/prefs/prefs_tab_helper.h" 27 #include "chrome/browser/ui/prefs/prefs_tab_helper.h"
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
106 extensions::SetViewType(web_contents, extensions::VIEW_TYPE_TAB_CONTENTS); 107 extensions::SetViewType(web_contents, extensions::VIEW_TYPE_TAB_CONTENTS);
107 108
108 // Create all the tab helpers. 109 // Create all the tab helpers.
109 110
110 // SessionTabHelper comes first because it sets up the tab ID, and other 111 // SessionTabHelper comes first because it sets up the tab ID, and other
111 // helpers may rely on that. 112 // helpers may rely on that.
112 SessionTabHelper::CreateForWebContents(web_contents); 113 SessionTabHelper::CreateForWebContents(web_contents);
113 114
114 // --- Common tab helpers --- 115 // --- Common tab helpers ---
115 116
117 ResourceThrottle::CreateForWebContents(web_contents);
Avi (use Gerrit) 2014/05/20 14:41:39 Alphabetically, please!
116 autofill::TabAutofillManagerDelegate::CreateForWebContents(web_contents); 118 autofill::TabAutofillManagerDelegate::CreateForWebContents(web_contents);
117 autofill::ContentAutofillDriver::CreateForWebContentsAndDelegate( 119 autofill::ContentAutofillDriver::CreateForWebContentsAndDelegate(
118 web_contents, 120 web_contents,
119 autofill::TabAutofillManagerDelegate::FromWebContents(web_contents), 121 autofill::TabAutofillManagerDelegate::FromWebContents(web_contents),
120 g_browser_process->GetApplicationLocale(), 122 g_browser_process->GetApplicationLocale(),
121 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER); 123 autofill::AutofillManager::ENABLE_AUTOFILL_DOWNLOAD_MANAGER);
122 BookmarkTabHelper::CreateForWebContents(web_contents); 124 BookmarkTabHelper::CreateForWebContents(web_contents);
123 chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents); 125 chrome_browser_net::NetErrorTabHelper::CreateForWebContents(web_contents);
124 ChromePasswordManagerClient::CreateForWebContentsWithAutofillManagerDelegate( 126 ChromePasswordManagerClient::CreateForWebContentsWithAutofillManagerDelegate(
125 web_contents, 127 web_contents,
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
200 if (OneClickSigninHelper::CanOffer(web_contents, 202 if (OneClickSigninHelper::CanOffer(web_contents,
201 OneClickSigninHelper::CAN_OFFER_FOR_ALL, 203 OneClickSigninHelper::CAN_OFFER_FOR_ALL,
202 std::string(), 204 std::string(),
203 NULL)) { 205 NULL)) {
204 OneClickSigninHelper::CreateForWebContentsWithPasswordManager( 206 OneClickSigninHelper::CreateForWebContentsWithPasswordManager(
205 web_contents, 207 web_contents,
206 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents)); 208 ChromePasswordManagerClient::GetManagerFromWebContents(web_contents));
207 } 209 }
208 #endif 210 #endif
209 } 211 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698