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

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

Issue 7574002: Be able to print items that do window.print(); window.close() (airline tix e.g.) (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebase. Created 9 years, 4 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) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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_manager.h" 10 #include "chrome/browser/autofill/autofill_manager.h"
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
185 if (prefs) { 185 if (prefs) {
186 for (int i = 0; i < kPrefsToObserveLength; ++i) 186 for (int i = 0; i < kPrefsToObserveLength; ++i)
187 pref_change_registrar_.Add(kPrefsToObserve[i], this); 187 pref_change_registrar_.Add(kPrefsToObserve[i], this);
188 } 188 }
189 189
190 renderer_preferences_util::UpdateFromSystemSettings( 190 renderer_preferences_util::UpdateFromSystemSettings(
191 tab_contents()->GetMutableRendererPrefs(), profile()); 191 tab_contents()->GetMutableRendererPrefs(), profile());
192 } 192 }
193 193
194 TabContentsWrapper::~TabContentsWrapper() { 194 TabContentsWrapper::~TabContentsWrapper() {
195 DLOG(ERROR) << "~TabContentsWrapper(" << (void*)this << ')';
196
195 in_destructor_ = true; 197 in_destructor_ = true;
196 198
197 // Destroy all remaining InfoBars. It's important to not animate here so that 199 // Destroy all remaining InfoBars. It's important to not animate here so that
198 // we guarantee that we'll delete all delegates before we do anything else. 200 // we guarantee that we'll delete all delegates before we do anything else.
199 // 201 //
200 // TODO(pkasting): If there is no InfoBarContainer, this leaks all the 202 // TODO(pkasting): If there is no InfoBarContainer, this leaks all the
201 // InfoBarDelegates. This will be fixed once we call CloseSoon() directly on 203 // InfoBarDelegates. This will be fixed once we call CloseSoon() directly on
202 // Infobars. 204 // Infobars.
203 RemoveAllInfoBars(false); 205 RemoveAllInfoBars(false);
204 } 206 }
(...skipping 509 matching lines...) Expand 10 before | Expand all | Expand 10 after
714 if (infobars_.empty()) { 716 if (infobars_.empty()) {
715 registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED, 717 registrar_.Remove(this, content::NOTIFICATION_NAV_ENTRY_COMMITTED,
716 Source<NavigationController>(&tab_contents_->controller())); 718 Source<NavigationController>(&tab_contents_->controller()));
717 } 719 }
718 } 720 }
719 721
720 void TabContentsWrapper::RemoveAllInfoBars(bool animate) { 722 void TabContentsWrapper::RemoveAllInfoBars(bool animate) {
721 while (!infobars_.empty()) 723 while (!infobars_.empty())
722 RemoveInfoBarInternal(GetInfoBarDelegateAt(infobar_count() - 1), animate); 724 RemoveInfoBarInternal(GetInfoBarDelegateAt(infobar_count() - 1), animate);
723 } 725 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698