Add a minor text member to ui::MenuModel.
[chromium-blink-merge.git] / chrome / browser / ui / collected_cookies_infobar_delegate.cc
blobb60761e93db267f16411fe2ed33c650d3965c164
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 "chrome/browser/ui/collected_cookies_infobar_delegate.h"
7 #include "base/logging.h"
8 #include "chrome/browser/infobars/infobar_service.h"
9 #include "content/public/browser/web_contents.h"
10 #include "grit/generated_resources.h"
11 #include "grit/theme_resources.h"
12 #include "ui/base/l10n/l10n_util.h"
15 // static
16 void CollectedCookiesInfoBarDelegate::Create(InfoBarService* infobar_service) {
17 infobar_service->AddInfoBar(scoped_ptr<InfoBarDelegate>(
18 new CollectedCookiesInfoBarDelegate(infobar_service)));
21 CollectedCookiesInfoBarDelegate::CollectedCookiesInfoBarDelegate(
22 InfoBarService* infobar_service)
23 : ConfirmInfoBarDelegate(infobar_service) {
26 CollectedCookiesInfoBarDelegate::~CollectedCookiesInfoBarDelegate() {
29 int CollectedCookiesInfoBarDelegate::GetIconID() const {
30 return IDR_INFOBAR_COOKIE;
33 InfoBarDelegate::Type CollectedCookiesInfoBarDelegate::GetInfoBarType() const {
34 return PAGE_ACTION_TYPE;
37 string16 CollectedCookiesInfoBarDelegate::GetMessageText() const {
38 return l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_INFOBAR_MESSAGE);
41 int CollectedCookiesInfoBarDelegate::GetButtons() const {
42 return BUTTON_OK;
45 string16 CollectedCookiesInfoBarDelegate::GetButtonLabel(
46 InfoBarButton button) const {
47 DCHECK_EQ(BUTTON_OK, button);
48 return l10n_util::GetStringUTF16(IDS_COLLECTED_COOKIES_INFOBAR_BUTTON);
51 bool CollectedCookiesInfoBarDelegate::Accept() {
52 web_contents()->GetController().Reload(true);
53 return true;