cygprofile: increase timeouts to allow showing web contents
[chromium-blink-merge.git] / components / infobars / core / confirm_infobar_delegate.cc
blobdaef8c1536e378967b41a85577d363425da1f0ad
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
3 // found in the LICENSE file.
5 #include "components/infobars/core/confirm_infobar_delegate.h"
7 #include "base/logging.h"
8 #include "components/infobars/core/infobar.h"
9 #include "ui/base/l10n/l10n_util.h"
10 #include "ui/strings/grit/ui_strings.h"
12 using infobars::InfoBarDelegate;
14 ConfirmInfoBarDelegate::~ConfirmInfoBarDelegate() {
17 InfoBarDelegate::InfoBarAutomationType
18 ConfirmInfoBarDelegate::GetInfoBarAutomationType() const {
19 return CONFIRM_INFOBAR;
22 int ConfirmInfoBarDelegate::GetButtons() const {
23 return BUTTON_OK | BUTTON_CANCEL;
26 base::string16 ConfirmInfoBarDelegate::GetButtonLabel(
27 InfoBarButton button) const {
28 return l10n_util::GetStringUTF16((button == BUTTON_OK) ?
29 IDS_APP_OK : IDS_APP_CANCEL);
32 bool ConfirmInfoBarDelegate::OKButtonTriggersUACPrompt() const {
33 return false;
36 bool ConfirmInfoBarDelegate::Accept() {
37 return true;
40 bool ConfirmInfoBarDelegate::Cancel() {
41 return true;
44 base::string16 ConfirmInfoBarDelegate::GetLinkText() const {
45 return base::string16();
48 bool ConfirmInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) {
49 return true;
52 ConfirmInfoBarDelegate::ConfirmInfoBarDelegate()
53 : InfoBarDelegate() {
56 bool ConfirmInfoBarDelegate::EqualsDelegate(InfoBarDelegate* delegate) const {
57 ConfirmInfoBarDelegate* confirm_delegate =
58 delegate->AsConfirmInfoBarDelegate();
59 return confirm_delegate &&
60 (confirm_delegate->GetMessageText() == GetMessageText());
63 ConfirmInfoBarDelegate* ConfirmInfoBarDelegate::AsConfirmInfoBarDelegate() {
64 return this;