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

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

Issue 6926001: Replace the virtual InfoBarDelegate::InfoBarClosed() function with a non-virtual one. This is a ... (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: '' Created 9 years, 7 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 "content/browser/tab_contents/navigation_controller.h" 9 #include "content/browser/tab_contents/navigation_controller.h"
10 #include "content/browser/tab_contents/navigation_entry.h" 10 #include "content/browser/tab_contents/navigation_entry.h"
(...skipping 12 matching lines...) Expand all
23 const NavigationController::LoadCommittedDetails& details) const { 23 const NavigationController::LoadCommittedDetails& details) const {
24 return (contents_unique_id_ != details.entry->unique_id()) || 24 return (contents_unique_id_ != details.entry->unique_id()) ||
25 (PageTransition::StripQualifier(details.entry->transition_type()) == 25 (PageTransition::StripQualifier(details.entry->transition_type()) ==
26 PageTransition::RELOAD); 26 PageTransition::RELOAD);
27 } 27 }
28 28
29 void InfoBarDelegate::InfoBarDismissed() { 29 void InfoBarDelegate::InfoBarDismissed() {
30 } 30 }
31 31
32 void InfoBarDelegate::InfoBarClosed() { 32 void InfoBarDelegate::InfoBarClosed() {
33 delete this;
33 } 34 }
34 35
35 gfx::Image* InfoBarDelegate::GetIcon() const { 36 gfx::Image* InfoBarDelegate::GetIcon() const {
36 return NULL; 37 return NULL;
37 } 38 }
38 39
39 InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const { 40 InfoBarDelegate::Type InfoBarDelegate::GetInfoBarType() const {
40 return WARNING_TYPE; 41 return WARNING_TYPE;
41 } 42 }
42 43
(...skipping 26 matching lines...) Expand all
69 InfoBarDelegate::InfoBarDelegate(TabContents* contents) 70 InfoBarDelegate::InfoBarDelegate(TabContents* contents)
70 : contents_unique_id_(0) { 71 : contents_unique_id_(0) {
71 if (contents) 72 if (contents)
72 StoreActiveEntryUniqueID(contents); 73 StoreActiveEntryUniqueID(contents);
73 } 74 }
74 75
75 void InfoBarDelegate::StoreActiveEntryUniqueID(TabContents* contents) { 76 void InfoBarDelegate::StoreActiveEntryUniqueID(TabContents* contents) {
76 NavigationEntry* active_entry = contents->controller().GetActiveEntry(); 77 NavigationEntry* active_entry = contents->controller().GetActiveEntry();
77 contents_unique_id_ = active_entry ? active_entry->unique_id() : 0; 78 contents_unique_id_ = active_entry ? active_entry->unique_id() : 0;
78 } 79 }
OLDNEW
« no previous file with comments | « chrome/browser/tab_contents/infobar_delegate.h ('k') | chrome/browser/tab_contents/simple_alert_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698