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

Side by Side Diff: chrome/browser/api/infobars/infobar_delegate.cc

Issue 11644059: Change infobar creation to use a public static Create() method on the infobar delegate classes. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: Created 7 years, 11 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/api/infobars/infobar_delegate.h" 5 #include "chrome/browser/api/infobars/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/api/infobars/infobar_service.h" 9 #include "chrome/browser/api/infobars/infobar_service.h"
10 #include "content/public/browser/navigation_controller.h" 10 #include "content/public/browser/navigation_controller.h"
(...skipping 21 matching lines...) Expand all
32 const content::LoadCommittedDetails& details) const { 32 const content::LoadCommittedDetails& details) const {
33 if (!details.is_navigation_to_different_page()) 33 if (!details.is_navigation_to_different_page())
34 return false; 34 return false;
35 35
36 return ShouldExpireInternal(details); 36 return ShouldExpireInternal(details);
37 } 37 }
38 38
39 void InfoBarDelegate::InfoBarDismissed() { 39 void InfoBarDelegate::InfoBarDismissed() {
40 } 40 }
41 41
42 void InfoBarDelegate::InfoBarClosed() {
43 delete this;
44 }
45
46 gfx::Image* InfoBarDelegate::GetIcon() const { 42 gfx::Image* InfoBarDelegate::GetIcon() const {
47 return NULL; 43 return NULL;
48 } 44 }
49 45
50 InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const { 46 InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const {
51 return WARNING_TYPE; 47 return WARNING_TYPE;
52 } 48 }
53 49
54 AlternateNavInfoBarDelegate* InfoBarDelegate::AsAlternateNavInfoBarDelegate() { 50 AlternateNavInfoBarDelegate* InfoBarDelegate::AsAlternateNavInfoBarDelegate() {
55 return NULL; 51 return NULL;
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
116 return (contents_unique_id_ != details.entry->GetUniqueID()) || 112 return (contents_unique_id_ != details.entry->GetUniqueID()) ||
117 (content::PageTransitionStripQualifier( 113 (content::PageTransitionStripQualifier(
118 details.entry->GetTransitionType()) == 114 details.entry->GetTransitionType()) ==
119 content::PAGE_TRANSITION_RELOAD); 115 content::PAGE_TRANSITION_RELOAD);
120 } 116 }
121 117
122 void InfoBarDelegate::RemoveSelf() { 118 void InfoBarDelegate::RemoveSelf() {
123 if (owner_) 119 if (owner_)
124 owner_->RemoveInfoBar(this); // Clears |owner_|. 120 owner_->RemoveInfoBar(this); // Clears |owner_|.
125 } 121 }
OLDNEW
« no previous file with comments | « chrome/browser/api/infobars/infobar_delegate.h ('k') | chrome/browser/api/infobars/infobar_service.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698