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

Side by Side Diff: chrome/browser/ui/website_settings/website_settings_infobar_delegate.cc

Issue 10830050: (Views only) Prompt the user to reload the website after changing site permissions. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Address comments (Finnur). 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
(Empty)
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.
4
5 #include "chrome/browser/ui/website_settings/website_settings_infobar_delegate.h "
6
7 #include "base/logging.h"
8 #include "base/utf_string_conversions.h"
9 #include "chrome/browser/infobars/infobar_tab_helper.h"
10 #include "content/public/browser/web_contents.h"
11 #include "grit/generated_resources.h"
12 #include "grit/theme_resources.h"
13 #include "ui/base/l10n/l10n_util.h"
14 #include "ui/base/resource/resource_bundle.h"
15
16 WebsiteSettingsInfobarDelegate::WebsiteSettingsInfobarDelegate(
17 InfoBarTabHelper* infobar_helper)
18 : ConfirmInfoBarDelegate(infobar_helper) {
19 }
20
21 gfx::Image* WebsiteSettingsInfobarDelegate::GetIcon() const {
22 return &ResourceBundle::GetSharedInstance().GetNativeImageNamed(
23 IDR_INFOBAR_ALT_NAV_URL);
24 }
25
26 InfoBarDelegate::Type WebsiteSettingsInfobarDelegate::GetInfoBarType() const {
27 return PAGE_ACTION_TYPE;
28 }
29
30 string16 WebsiteSettingsInfobarDelegate::GetMessageText() const {
31 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_TEXT);
32 }
33
34 int WebsiteSettingsInfobarDelegate::GetButtons() const {
35 return BUTTON_OK;
36 }
37
38 string16 WebsiteSettingsInfobarDelegate::GetButtonLabel(
39 InfoBarButton button) const {
40 DCHECK_EQ(BUTTON_OK, button);
41 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_BUTTON);
42 }
43
44 bool WebsiteSettingsInfobarDelegate::Accept() {
45 owner()->web_contents()->GetController().Reload(true);
46 return true;
47 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698