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

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

Issue 2372243003: Remove a couple desktop infobar png assets. (Closed)
Patch Set: remove mac macro Created 4 years, 2 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
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings_infobar_delegate.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/ui/website_settings/website_settings_infobar_delegate.h " 5 #include "chrome/browser/ui/website_settings/website_settings_infobar_delegate.h "
6 6
7 #include "base/logging.h" 7 #include "base/logging.h"
8 #include "base/strings/utf_string_conversions.h" 8 #include "base/strings/utf_string_conversions.h"
9 #include "build/build_config.h" 9 #include "build/build_config.h"
10 #include "chrome/browser/infobars/infobar_service.h" 10 #include "chrome/browser/infobars/infobar_service.h"
(...skipping 21 matching lines...) Expand all
32 infobars::InfoBarDelegate::Type 32 infobars::InfoBarDelegate::Type
33 WebsiteSettingsInfoBarDelegate::GetInfoBarType() const { 33 WebsiteSettingsInfoBarDelegate::GetInfoBarType() const {
34 return PAGE_ACTION_TYPE; 34 return PAGE_ACTION_TYPE;
35 } 35 }
36 36
37 infobars::InfoBarDelegate::InfoBarIdentifier 37 infobars::InfoBarDelegate::InfoBarIdentifier
38 WebsiteSettingsInfoBarDelegate::GetIdentifier() const { 38 WebsiteSettingsInfoBarDelegate::GetIdentifier() const {
39 return WEBSITE_SETTINGS_INFOBAR_DELEGATE; 39 return WEBSITE_SETTINGS_INFOBAR_DELEGATE;
40 } 40 }
41 41
42 int WebsiteSettingsInfoBarDelegate::GetIconId() const {
43 return IDR_INFOBAR_ALT_NAV_URL;
44 }
45
46 gfx::VectorIconId WebsiteSettingsInfoBarDelegate::GetVectorIconId() const { 42 gfx::VectorIconId WebsiteSettingsInfoBarDelegate::GetVectorIconId() const {
47 #if defined(OS_MACOSX)
48 return gfx::VectorIconId::VECTOR_ICON_NONE;
49 #else
50 return gfx::VectorIconId::GLOBE; 43 return gfx::VectorIconId::GLOBE;
51 #endif
52 } 44 }
53 45
54 base::string16 WebsiteSettingsInfoBarDelegate::GetMessageText() const { 46 base::string16 WebsiteSettingsInfoBarDelegate::GetMessageText() const {
55 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_TEXT); 47 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_TEXT);
56 } 48 }
57 49
58 int WebsiteSettingsInfoBarDelegate::GetButtons() const { 50 int WebsiteSettingsInfoBarDelegate::GetButtons() const {
59 return BUTTON_OK; 51 return BUTTON_OK;
60 } 52 }
61 53
62 base::string16 WebsiteSettingsInfoBarDelegate::GetButtonLabel( 54 base::string16 WebsiteSettingsInfoBarDelegate::GetButtonLabel(
63 InfoBarButton button) const { 55 InfoBarButton button) const {
64 DCHECK_EQ(BUTTON_OK, button); 56 DCHECK_EQ(BUTTON_OK, button);
65 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_BUTTON); 57 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_BUTTON);
66 } 58 }
67 59
68 bool WebsiteSettingsInfoBarDelegate::Accept() { 60 bool WebsiteSettingsInfoBarDelegate::Accept() {
69 content::WebContents* web_contents = 61 content::WebContents* web_contents =
70 InfoBarService::WebContentsFromInfoBar(infobar()); 62 InfoBarService::WebContentsFromInfoBar(infobar());
71 web_contents->GetController().Reload(true); 63 web_contents->GetController().Reload(true);
72 return true; 64 return true;
73 } 65 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/website_settings/website_settings_infobar_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698