| 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/page_info/page_info_infobar_delegate.h" | 5 #include "chrome/browser/ui/page_info/page_info_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/app/vector_icons/vector_icons.h" | 10 #include "chrome/app/vector_icons/vector_icons.h" |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 const { | 28 const { |
| 29 return PAGE_ACTION_TYPE; | 29 return PAGE_ACTION_TYPE; |
| 30 } | 30 } |
| 31 | 31 |
| 32 infobars::InfoBarDelegate::InfoBarIdentifier | 32 infobars::InfoBarDelegate::InfoBarIdentifier |
| 33 PageInfoInfoBarDelegate::GetIdentifier() const { | 33 PageInfoInfoBarDelegate::GetIdentifier() const { |
| 34 return PAGE_INFO_INFOBAR_DELEGATE; | 34 return PAGE_INFO_INFOBAR_DELEGATE; |
| 35 } | 35 } |
| 36 | 36 |
| 37 const gfx::VectorIcon& PageInfoInfoBarDelegate::GetVectorIcon() const { | 37 const gfx::VectorIcon& PageInfoInfoBarDelegate::GetVectorIcon() const { |
| 38 return kGlobeIcon; | 38 return kSettingsIcon; |
| 39 } | 39 } |
| 40 | 40 |
| 41 base::string16 PageInfoInfoBarDelegate::GetMessageText() const { | 41 base::string16 PageInfoInfoBarDelegate::GetMessageText() const { |
| 42 return l10n_util::GetStringUTF16(IDS_PAGE_INFO_INFOBAR_TEXT); | 42 return l10n_util::GetStringUTF16(IDS_PAGE_INFO_INFOBAR_TEXT); |
| 43 } | 43 } |
| 44 | 44 |
| 45 int PageInfoInfoBarDelegate::GetButtons() const { | 45 int PageInfoInfoBarDelegate::GetButtons() const { |
| 46 return BUTTON_OK; | 46 return BUTTON_OK; |
| 47 } | 47 } |
| 48 | 48 |
| 49 base::string16 PageInfoInfoBarDelegate::GetButtonLabel( | 49 base::string16 PageInfoInfoBarDelegate::GetButtonLabel( |
| 50 InfoBarButton button) const { | 50 InfoBarButton button) const { |
| 51 DCHECK_EQ(BUTTON_OK, button); | 51 DCHECK_EQ(BUTTON_OK, button); |
| 52 return l10n_util::GetStringUTF16(IDS_PAGE_INFO_INFOBAR_BUTTON); | 52 return l10n_util::GetStringUTF16(IDS_PAGE_INFO_INFOBAR_BUTTON); |
| 53 } | 53 } |
| 54 | 54 |
| 55 bool PageInfoInfoBarDelegate::Accept() { | 55 bool PageInfoInfoBarDelegate::Accept() { |
| 56 content::WebContents* web_contents = | 56 content::WebContents* web_contents = |
| 57 InfoBarService::WebContentsFromInfoBar(infobar()); | 57 InfoBarService::WebContentsFromInfoBar(infobar()); |
| 58 web_contents->GetController().Reload(content::ReloadType::NORMAL, true); | 58 web_contents->GetController().Reload(content::ReloadType::NORMAL, true); |
| 59 return true; | 59 return true; |
| 60 } | 60 } |
| OLD | NEW |