| OLD | NEW |
| 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 "chrome/browser/infobars/infobar_service.h" | 9 #include "chrome/browser/infobars/infobar_service.h" |
| 10 #include "chrome/grit/generated_resources.h" | 10 #include "chrome/grit/generated_resources.h" |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 } | 26 } |
| 27 | 27 |
| 28 WebsiteSettingsInfoBarDelegate::~WebsiteSettingsInfoBarDelegate() { | 28 WebsiteSettingsInfoBarDelegate::~WebsiteSettingsInfoBarDelegate() { |
| 29 } | 29 } |
| 30 | 30 |
| 31 infobars::InfoBarDelegate::Type | 31 infobars::InfoBarDelegate::Type |
| 32 WebsiteSettingsInfoBarDelegate::GetInfoBarType() const { | 32 WebsiteSettingsInfoBarDelegate::GetInfoBarType() const { |
| 33 return PAGE_ACTION_TYPE; | 33 return PAGE_ACTION_TYPE; |
| 34 } | 34 } |
| 35 | 35 |
| 36 std::string WebsiteSettingsInfoBarDelegate::GetIdentifier() const { |
| 37 return "WebsiteSettingsInfoBarDelegate"; |
| 38 } |
| 39 |
| 36 int WebsiteSettingsInfoBarDelegate::GetIconId() const { | 40 int WebsiteSettingsInfoBarDelegate::GetIconId() const { |
| 37 return IDR_INFOBAR_ALT_NAV_URL; | 41 return IDR_INFOBAR_ALT_NAV_URL; |
| 38 } | 42 } |
| 39 | 43 |
| 40 gfx::VectorIconId WebsiteSettingsInfoBarDelegate::GetVectorIconId() const { | 44 gfx::VectorIconId WebsiteSettingsInfoBarDelegate::GetVectorIconId() const { |
| 41 #if defined(OS_MACOSX) | 45 #if defined(OS_MACOSX) |
| 42 return gfx::VectorIconId::VECTOR_ICON_NONE; | 46 return gfx::VectorIconId::VECTOR_ICON_NONE; |
| 43 #else | 47 #else |
| 44 return gfx::VectorIconId::GLOBE; | 48 return gfx::VectorIconId::GLOBE; |
| 45 #endif | 49 #endif |
| (...skipping 12 matching lines...) Expand all Loading... |
| 58 DCHECK_EQ(BUTTON_OK, button); | 62 DCHECK_EQ(BUTTON_OK, button); |
| 59 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_BUTTON); | 63 return l10n_util::GetStringUTF16(IDS_WEBSITE_SETTINGS_INFOBAR_BUTTON); |
| 60 } | 64 } |
| 61 | 65 |
| 62 bool WebsiteSettingsInfoBarDelegate::Accept() { | 66 bool WebsiteSettingsInfoBarDelegate::Accept() { |
| 63 content::WebContents* web_contents = | 67 content::WebContents* web_contents = |
| 64 InfoBarService::WebContentsFromInfoBar(infobar()); | 68 InfoBarService::WebContentsFromInfoBar(infobar()); |
| 65 web_contents->GetController().Reload(true); | 69 web_contents->GetController().Reload(true); |
| 66 return true; | 70 return true; |
| 67 } | 71 } |
| OLD | NEW |