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

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

Issue 7810002: Move infobar handling to a tab helper. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fixes Created 9 years, 3 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/tab_contents/infobar_delegate.h" 5 #include "chrome/browser/tab_contents/infobar_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "build/build_config.h" 8 #include "build/build_config.h"
9 #include "chrome/browser/infobars/infobar_tab_helper.h"
9 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h" 10 #include "chrome/browser/ui/tab_contents/tab_contents_wrapper.h"
10 #include "content/browser/tab_contents/navigation_details.h" 11 #include "content/browser/tab_contents/navigation_details.h"
11 #include "content/browser/tab_contents/navigation_entry.h" 12 #include "content/browser/tab_contents/navigation_entry.h"
12 #include "content/browser/tab_contents/tab_contents.h" 13 #include "content/browser/tab_contents/tab_contents.h"
13 14
14 // InfoBarDelegate ------------------------------------------------------------ 15 // InfoBarDelegate ------------------------------------------------------------
15 16
16 InfoBarDelegate::~InfoBarDelegate() { 17 InfoBarDelegate::~InfoBarDelegate() {
17 } 18 }
18 19
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
89 bool InfoBarDelegate::ShouldExpireInternal( 90 bool InfoBarDelegate::ShouldExpireInternal(
90 const content::LoadCommittedDetails& details) const { 91 const content::LoadCommittedDetails& details) const {
91 return (contents_unique_id_ != details.entry->unique_id()) || 92 return (contents_unique_id_ != details.entry->unique_id()) ||
92 (PageTransition::StripQualifier(details.entry->transition_type()) == 93 (PageTransition::StripQualifier(details.entry->transition_type()) ==
93 PageTransition::RELOAD); 94 PageTransition::RELOAD);
94 } 95 }
95 96
96 void InfoBarDelegate::RemoveSelf() { 97 void InfoBarDelegate::RemoveSelf() {
97 if (owner_) { 98 if (owner_) {
98 TabContentsWrapper::GetCurrentWrapperForContents(owner_)-> 99 TabContentsWrapper::GetCurrentWrapperForContents(owner_)->
99 RemoveInfoBar(this); // Clears |owner_|. 100 infobar_tab_helper()->RemoveInfoBar(this); // Clears |owner_|.
100 } 101 }
101 } 102 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/infobar_container.cc ('k') | chrome/browser/tab_contents/tab_contents_ssl_helper.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698