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

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

Issue 10830353: Introduce InfoBarTabService API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Respond to review comments, merge to LKGR Created 8 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) 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/confirm_infobar_delegate.h" 5 #include "chrome/browser/api/infobars/confirm_infobar_delegate.h"
6 6
7 #include "content/public/browser/navigation_details.h" 7 #include "content/public/browser/navigation_details.h"
8 #include "grit/generated_resources.h" 8 #include "grit/generated_resources.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 10
(...skipping 23 matching lines...) Expand all
34 } 34 }
35 35
36 string16 ConfirmInfoBarDelegate::GetLinkText() const { 36 string16 ConfirmInfoBarDelegate::GetLinkText() const {
37 return string16(); 37 return string16();
38 } 38 }
39 39
40 bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { 40 bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
41 return true; 41 return true;
42 } 42 }
43 43
44 ConfirmInfoBarDelegate::ConfirmInfoBarDelegate(InfoBarTabHelper* infobar_helper) 44 ConfirmInfoBarDelegate::ConfirmInfoBarDelegate(
45 : InfoBarDelegate(infobar_helper) { 45 InfoBarTabService* infobar_service)
46 : InfoBarDelegate(infobar_service) {
46 } 47 }
47 48
48 ConfirmInfoBarDelegate::~ConfirmInfoBarDelegate() { 49 ConfirmInfoBarDelegate::~ConfirmInfoBarDelegate() {
49 } 50 }
50 51
51 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { 52 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
52 ConfirmInfoBarDelegate* confirm_delegate = 53 ConfirmInfoBarDelegate* confirm_delegate =
53 delegate->AsConfirmInfoBarDelegate(); 54 delegate->AsConfirmInfoBarDelegate();
54 return confirm_delegate && 55 return confirm_delegate &&
55 (confirm_delegate->GetMessageText() == GetMessageText()); 56 (confirm_delegate->GetMessageText() == GetMessageText());
56 } 57 }
57 58
58 bool ConfirmInfoBarDelegate::ShouldExpireInternal( 59 bool ConfirmInfoBarDelegate::ShouldExpireInternal(
59 const content::LoadCommittedDetails& details) const { 60 const content::LoadCommittedDetails& details) const {
60 return !details.did_replace_entry && 61 return !details.did_replace_entry &&
61 InfoBarDelegate::ShouldExpireInternal(details); 62 InfoBarDelegate::ShouldExpireInternal(details);
62 } 63 }
63 64
64 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() { 65 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() {
65 return this; 66 return this;
66 } 67 }
OLDNEW
« no previous file with comments | « chrome/browser/api/infobars/confirm_infobar_delegate.h ('k') | chrome/browser/api/infobars/infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698