| 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/startup/obsolete_os_infobar_delegate.h" | 5 #include "chrome/browser/ui/startup/obsolete_os_infobar_delegate.h" |
| 6 | 6 |
| 7 #include "chrome/browser/infobars/infobar_service.h" | 7 #include "chrome/browser/infobars/infobar_service.h" |
| 8 #include "content/public/browser/web_contents.h" | 8 #include "content/public/browser/web_contents.h" |
| 9 #include "grit/chromium_strings.h" | 9 #include "grit/chromium_strings.h" |
| 10 #include "grit/generated_resources.h" | 10 #include "grit/generated_resources.h" |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 } | 57 } |
| 58 | 58 |
| 59 string16 ObsoleteOSInfoBarDelegate::GetLinkText() const { | 59 string16 ObsoleteOSInfoBarDelegate::GetLinkText() const { |
| 60 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); | 60 return l10n_util::GetStringUTF16(IDS_LEARN_MORE); |
| 61 } | 61 } |
| 62 | 62 |
| 63 bool ObsoleteOSInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { | 63 bool ObsoleteOSInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { |
| 64 OpenURLParams params(learn_more_url_, Referrer(), | 64 OpenURLParams params(learn_more_url_, Referrer(), |
| 65 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 65 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
| 66 content::PAGE_TRANSITION_LINK, false); | 66 content::PAGE_TRANSITION_LINK, false); |
| 67 owner()->GetWebContents()->OpenURL(params); | 67 owner()->web_contents()->OpenURL(params); |
| 68 return false; | 68 return false; |
| 69 } | 69 } |
| 70 | 70 |
| 71 ObsoleteOSInfoBarDelegate::ObsoleteOSInfoBarDelegate( | 71 ObsoleteOSInfoBarDelegate::ObsoleteOSInfoBarDelegate( |
| 72 InfoBarService* infobar_service, | 72 InfoBarService* infobar_service, |
| 73 const string16& message, | 73 const string16& message, |
| 74 const GURL& url) | 74 const GURL& url) |
| 75 : ConfirmInfoBarDelegate(infobar_service), | 75 : ConfirmInfoBarDelegate(infobar_service), |
| 76 message_(message), | 76 message_(message), |
| 77 learn_more_url_(url) { | 77 learn_more_url_(url) { |
| 78 } | 78 } |
| 79 | 79 |
| 80 ObsoleteOSInfoBarDelegate::~ObsoleteOSInfoBarDelegate() { | 80 ObsoleteOSInfoBarDelegate::~ObsoleteOSInfoBarDelegate() { |
| 81 } | 81 } |
| 82 | 82 |
| 83 } // namespace chrome | 83 } // namespace chrome |
| OLD | NEW |