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

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

Issue 10020051: Open a login tab on captive portal detection on SSL loads. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Sync Created 8 years, 6 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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_contents/tab_contents.h" 5 #include "chrome/browser/ui/tab_contents/tab_contents.h"
6 6
7 #include "base/command_line.h" 7 #include "base/command_line.h"
8 #include "base/lazy_instance.h" 8 #include "base/lazy_instance.h"
9 #include "chrome/browser/autocomplete_history_manager.h" 9 #include "chrome/browser/autocomplete_history_manager.h"
10 #include "chrome/browser/autofill/autofill_external_delegate.h" 10 #include "chrome/browser/autofill/autofill_external_delegate.h"
11 #include "chrome/browser/autofill/autofill_manager.h" 11 #include "chrome/browser/autofill/autofill_manager.h"
12 #include "chrome/browser/automation/automation_tab_helper.h" 12 #include "chrome/browser/automation/automation_tab_helper.h"
13 #include "chrome/browser/captive_portal/captive_portal_tab_helper.h"
13 #include "chrome/browser/content_settings/tab_specific_content_settings.h" 14 #include "chrome/browser/content_settings/tab_specific_content_settings.h"
14 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 15 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
15 #include "chrome/browser/extensions/extension_tab_helper.h" 16 #include "chrome/browser/extensions/extension_tab_helper.h"
16 #include "chrome/browser/external_protocol/external_protocol_observer.h" 17 #include "chrome/browser/external_protocol/external_protocol_observer.h"
17 #include "chrome/browser/favicon/favicon_tab_helper.h" 18 #include "chrome/browser/favicon/favicon_tab_helper.h"
18 #include "chrome/browser/history/history_tab_helper.h" 19 #include "chrome/browser/history/history_tab_helper.h"
19 #include "chrome/browser/infobars/infobar_tab_helper.h" 20 #include "chrome/browser/infobars/infobar_tab_helper.h"
20 #include "chrome/browser/omnibox_search_hint.h" 21 #include "chrome/browser/omnibox_search_hint.h"
21 #include "chrome/browser/password_manager/password_manager.h" 22 #include "chrome/browser/password_manager/password_manager.h"
22 #include "chrome/browser/password_manager/password_manager_delegate_impl.h" 23 #include "chrome/browser/password_manager/password_manager_delegate_impl.h"
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
90 AutofillExternalDelegate::Create(this, autofill_manager_.get())); 91 AutofillExternalDelegate::Create(this, autofill_manager_.get()));
91 autofill_manager_->SetExternalDelegate(autofill_external_delegate_.get()); 92 autofill_manager_->SetExternalDelegate(autofill_external_delegate_.get());
92 autocomplete_history_manager_->SetExternalDelegate( 93 autocomplete_history_manager_->SetExternalDelegate(
93 autofill_external_delegate_.get()); 94 autofill_external_delegate_.get());
94 } 95 }
95 #if defined(ENABLE_AUTOMATION) 96 #if defined(ENABLE_AUTOMATION)
96 automation_tab_helper_.reset(new AutomationTabHelper(contents)); 97 automation_tab_helper_.reset(new AutomationTabHelper(contents));
97 #endif 98 #endif
98 blocked_content_tab_helper_.reset(new BlockedContentTabHelper(this)); 99 blocked_content_tab_helper_.reset(new BlockedContentTabHelper(this));
99 bookmark_tab_helper_.reset(new BookmarkTabHelper(this)); 100 bookmark_tab_helper_.reset(new BookmarkTabHelper(this));
101 #if defined(ENABLE_CAPTIVE_PORTAL_DETECTION)
102 captive_portal_tab_helper_.reset(
103 new captive_portal::CaptivePortalTabHelper(profile(), web_contents()));
104 #endif
100 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this)); 105 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this));
101 core_tab_helper_.reset(new CoreTabHelper(contents)); 106 core_tab_helper_.reset(new CoreTabHelper(contents));
102 extension_tab_helper_.reset(new ExtensionTabHelper(this)); 107 extension_tab_helper_.reset(new ExtensionTabHelper(this));
103 favicon_tab_helper_.reset(new FaviconTabHelper(contents)); 108 favicon_tab_helper_.reset(new FaviconTabHelper(contents));
104 find_tab_helper_.reset(new FindTabHelper(contents)); 109 find_tab_helper_.reset(new FindTabHelper(contents));
105 history_tab_helper_.reset(new HistoryTabHelper(contents)); 110 history_tab_helper_.reset(new HistoryTabHelper(contents));
106 hung_plugin_tab_helper_.reset(new HungPluginTabHelper(contents)); 111 hung_plugin_tab_helper_.reset(new HungPluginTabHelper(contents));
107 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); 112 infobar_tab_helper_.reset(new InfoBarTabHelper(contents));
108 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); 113 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this));
109 password_manager_.reset( 114 password_manager_.reset(
(...skipping 123 matching lines...) Expand 10 before | Expand all | Expand 10 after
233 238
234 //////////////////////////////////////////////////////////////////////////////// 239 ////////////////////////////////////////////////////////////////////////////////
235 // WebContentsObserver overrides 240 // WebContentsObserver overrides
236 241
237 void TabContents::WebContentsDestroyed(WebContents* tab) { 242 void TabContents::WebContentsDestroyed(WebContents* tab) {
238 // Destruction of the WebContents should only be done by us from our 243 // Destruction of the WebContents should only be done by us from our
239 // destructor. Otherwise it's very likely we (or one of the helpers we own) 244 // destructor. Otherwise it's very likely we (or one of the helpers we own)
240 // will attempt to access the WebContents and we'll crash. 245 // will attempt to access the WebContents and we'll crash.
241 DCHECK(in_destructor_); 246 DCHECK(in_destructor_);
242 } 247 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698