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

Side by Side Diff: chrome/browser/ui/tab_contents/tab_contents_wrapper.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: Created 8 years, 8 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_wrapper.h" 5 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.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/download/download_request_limiter_observer.h" 15 #include "chrome/browser/download/download_request_limiter_observer.h"
15 #include "chrome/browser/extensions/extension_tab_helper.h" 16 #include "chrome/browser/extensions/extension_tab_helper.h"
16 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h" 17 #include "chrome/browser/extensions/api/web_navigation/web_navigation_api.h"
17 #include "chrome/browser/external_protocol/external_protocol_observer.h" 18 #include "chrome/browser/external_protocol/external_protocol_observer.h"
18 #include "chrome/browser/favicon/favicon_tab_helper.h" 19 #include "chrome/browser/favicon/favicon_tab_helper.h"
19 #include "chrome/browser/history/history_tab_helper.h" 20 #include "chrome/browser/history/history_tab_helper.h"
20 #include "chrome/browser/infobars/infobar_tab_helper.h" 21 #include "chrome/browser/infobars/infobar_tab_helper.h"
21 #include "chrome/browser/omnibox_search_hint.h" 22 #include "chrome/browser/omnibox_search_hint.h"
22 #include "chrome/browser/password_manager/password_manager.h" 23 #include "chrome/browser/password_manager/password_manager.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 AutofillExternalDelegate::Create(this, autofill_manager_.get())); 80 AutofillExternalDelegate::Create(this, autofill_manager_.get()));
80 autofill_manager_->SetExternalDelegate(autofill_external_delegate_.get()); 81 autofill_manager_->SetExternalDelegate(autofill_external_delegate_.get());
81 autocomplete_history_manager_->SetExternalDelegate( 82 autocomplete_history_manager_->SetExternalDelegate(
82 autofill_external_delegate_.get()); 83 autofill_external_delegate_.get());
83 } 84 }
84 #if defined(ENABLE_AUTOMATION) 85 #if defined(ENABLE_AUTOMATION)
85 automation_tab_helper_.reset(new AutomationTabHelper(contents)); 86 automation_tab_helper_.reset(new AutomationTabHelper(contents));
86 #endif 87 #endif
87 blocked_content_tab_helper_.reset(new BlockedContentTabHelper(this)); 88 blocked_content_tab_helper_.reset(new BlockedContentTabHelper(this));
88 bookmark_tab_helper_.reset(new BookmarkTabHelper(this)); 89 bookmark_tab_helper_.reset(new BookmarkTabHelper(this));
90 #if !defined(OS_ANDROID)
91 captive_portal_tab_helper_.reset(
92 captive_portal::CaptivePortalTabHelper::Create(this));
93 #endif
89 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this)); 94 constrained_window_tab_helper_.reset(new ConstrainedWindowTabHelper(this));
90 core_tab_helper_.reset(new CoreTabHelper(contents)); 95 core_tab_helper_.reset(new CoreTabHelper(contents));
91 extension_tab_helper_.reset(new ExtensionTabHelper(this)); 96 extension_tab_helper_.reset(new ExtensionTabHelper(this));
92 favicon_tab_helper_.reset(new FaviconTabHelper(contents)); 97 favicon_tab_helper_.reset(new FaviconTabHelper(contents));
93 find_tab_helper_.reset(new FindTabHelper(contents)); 98 find_tab_helper_.reset(new FindTabHelper(contents));
94 history_tab_helper_.reset(new HistoryTabHelper(contents)); 99 history_tab_helper_.reset(new HistoryTabHelper(contents));
95 infobar_tab_helper_.reset(new InfoBarTabHelper(contents)); 100 infobar_tab_helper_.reset(new InfoBarTabHelper(contents));
96 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this)); 101 password_manager_delegate_.reset(new PasswordManagerDelegateImpl(this));
97 password_manager_.reset( 102 password_manager_.reset(
98 new PasswordManager(contents, password_manager_delegate_.get())); 103 new PasswordManager(contents, password_manager_delegate_.get()));
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 209
205 //////////////////////////////////////////////////////////////////////////////// 210 ////////////////////////////////////////////////////////////////////////////////
206 // WebContentsObserver overrides 211 // WebContentsObserver overrides
207 212
208 void TabContentsWrapper::WebContentsDestroyed(WebContents* tab) { 213 void TabContentsWrapper::WebContentsDestroyed(WebContents* tab) {
209 // Destruction of the WebContents should only be done by us from our 214 // Destruction of the WebContents should only be done by us from our
210 // destructor. Otherwise it's very likely we (or one of the helpers we own) 215 // destructor. Otherwise it's very likely we (or one of the helpers we own)
211 // will attempt to access the TabContents and we'll crash. 216 // will attempt to access the TabContents and we'll crash.
212 DCHECK(in_destructor_); 217 DCHECK(in_destructor_);
213 } 218 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698