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

Side by Side Diff: components/infobars/core/confirm_infobar_delegate.cc

Issue 1157733005: Make 'Google Smart Lock' a hyperlink in the password infobar on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 6 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 "components/infobars/core/confirm_infobar_delegate.h" 5 #include "components/infobars/core/confirm_infobar_delegate.h"
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "components/infobars/core/infobar.h" 8 #include "components/infobars/core/infobar.h"
9 #include "ui/base/l10n/l10n_util.h" 9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/strings/grit/ui_strings.h" 10 #include "ui/strings/grit/ui_strings.h"
11 11
12 using infobars::InfoBarDelegate; 12 using infobars::InfoBarDelegate;
13 13
14 ConfirmInfoBarDelegate::~ConfirmInfoBarDelegate() { 14 ConfirmInfoBarDelegate::~ConfirmInfoBarDelegate() {
15 } 15 }
16 16
17 InfoBarDelegate::InfoBarAutomationType 17 InfoBarDelegate::InfoBarAutomationType
18 ConfirmInfoBarDelegate::GetInfoBarAutomationType() const { 18 ConfirmInfoBarDelegate::GetInfoBarAutomationType() const {
19 return CONFIRM_INFOBAR; 19 return CONFIRM_INFOBAR;
20 } 20 }
21 21
22 gfx::Range ConfirmInfoBarDelegate::GetMessageLinkRange() const {
23 return gfx::Range();
24 }
25
22 int ConfirmInfoBarDelegate::GetButtons() const { 26 int ConfirmInfoBarDelegate::GetButtons() const {
23 return BUTTON_OK | BUTTON_CANCEL; 27 return BUTTON_OK | BUTTON_CANCEL;
24 } 28 }
25 29
26 base::string16 ConfirmInfoBarDelegate::GetButtonLabel( 30 base::string16 ConfirmInfoBarDelegate::GetButtonLabel(
27 InfoBarButton button) const { 31 InfoBarButton button) const {
28 return l10n_util::GetStringUTF16((button == BUTTON_OK) ? 32 return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
29 IDS_APP_OK : IDS_APP_CANCEL); 33 IDS_APP_OK : IDS_APP_CANCEL);
30 } 34 }
31 35
(...skipping 24 matching lines...) Expand all
56 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const { 60 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
57 ConfirmInfoBarDelegate* confirm_delegate = 61 ConfirmInfoBarDelegate* confirm_delegate =
58 delegate->AsConfirmInfoBarDelegate(); 62 delegate->AsConfirmInfoBarDelegate();
59 return confirm_delegate && 63 return confirm_delegate &&
60 (confirm_delegate->GetMessageText() == GetMessageText()); 64 (confirm_delegate->GetMessageText() == GetMessageText());
61 } 65 }
62 66
63 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() { 67 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() {
64 return this; 68 return this;
65 } 69 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698