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

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

Issue 190063006: Infobar Componentization Proof of Concept (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: minor fixes Created 6 years, 9 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
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/infobars/confirm_infobar_delegate.h" 5 #include "chrome/browser/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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
43 43
44 bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { 44 bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
45 return true; 45 return true;
46 } 46 }
47 47
48 ConfirmInfoBarDelegate::ConfirmInfoBarDelegate() 48 ConfirmInfoBarDelegate::ConfirmInfoBarDelegate()
49 : InfoBarDelegate() { 49 : InfoBarDelegate() {
50 } 50 }
51 51
52 bool ConfirmInfoBarDelegate::ShouldExpireInternal( 52 bool ConfirmInfoBarDelegate::ShouldExpireInternal(
53 const content::LoadCommittedDetails& details) const { 53 const NavigationDetails& details) const {
54 return !details.did_replace_entry && 54 return !details.did_replace_entry &&
55 InfoBarDelegate::ShouldExpireInternal(details); 55 InfoBarDelegate::ShouldExpireInternal(details);
Peter Kasting 2014/03/18 18:29:17 Nit: Old indenting was correct
56 } 56 }
57 57
58 // ConfirmInfoBarDelegate::CreateInfoBar() is implemented in platform-specific 58 // ConfirmInfoBarDelegate::CreateInfoBar() is implemented in platform-specific
59 // files. 59 // files.
60 60
61 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { 61 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
62 ConfirmInfoBarDelegate* confirm_delegate = 62 ConfirmInfoBarDelegate* confirm_delegate =
63 delegate->AsConfirmInfoBarDelegate(); 63 delegate->AsConfirmInfoBarDelegate();
64 return confirm_delegate && 64 return confirm_delegate &&
65 (confirm_delegate->GetMessageText() == GetMessageText()); 65 (confirm_delegate->GetMessageText() == GetMessageText());
66 } 66 }
67 67
68 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() { 68 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() {
69 return this; 69 return this;
70 } 70 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698