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/extensions/extension_install_ui_default.h" | 5 #include "chrome/browser/ui/extensions/extension_install_ui_default.h" |
6 | 6 |
7 #include "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
9 #include "chrome/browser/chrome_notification_types.h" | 9 #include "chrome/browser/chrome_notification_types.h" |
10 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" | 10 #include "chrome/browser/extensions/theme_installed_infobar_delegate.h" |
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
118 | 118 |
119 base::string16 ErrorInfoBarDelegate::GetLinkText() const { | 119 base::string16 ErrorInfoBarDelegate::GetLinkText() const { |
120 return (error_.type() == extensions::CrxInstallError::ERROR_OFF_STORE) | 120 return (error_.type() == extensions::CrxInstallError::ERROR_OFF_STORE) |
121 ? l10n_util::GetStringUTF16(IDS_LEARN_MORE) | 121 ? l10n_util::GetStringUTF16(IDS_LEARN_MORE) |
122 : base::string16(); | 122 : base::string16(); |
123 } | 123 } |
124 | 124 |
125 bool ErrorInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { | 125 bool ErrorInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { |
126 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( | 126 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( |
127 content::OpenURLParams( | 127 content::OpenURLParams( |
128 GURL("http://support.google.com/chrome_webstore/?p=crx_warning"), | 128 GURL("https://support.google.com/chrome_webstore/?p=crx_warning"), |
129 content::Referrer(), | 129 content::Referrer(), |
130 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 130 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
131 ui::PAGE_TRANSITION_LINK, false)); | 131 ui::PAGE_TRANSITION_LINK, false)); |
132 return false; | 132 return false; |
133 } | 133 } |
134 | 134 |
135 } // namespace | 135 } // namespace |
136 | 136 |
137 ExtensionInstallUIDefault::ExtensionInstallUIDefault( | 137 ExtensionInstallUIDefault::ExtensionInstallUIDefault( |
138 content::BrowserContext* context) | 138 content::BrowserContext* context) |
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
255 gfx::NativeWindow ExtensionInstallUIDefault::GetDefaultInstallDialogParent() { | 255 gfx::NativeWindow ExtensionInstallUIDefault::GetDefaultInstallDialogParent() { |
256 Browser* browser = | 256 Browser* browser = |
257 chrome::FindLastActiveWithProfile(profile_, chrome::GetActiveDesktop()); | 257 chrome::FindLastActiveWithProfile(profile_, chrome::GetActiveDesktop()); |
258 if (browser) { | 258 if (browser) { |
259 content::WebContents* contents = | 259 content::WebContents* contents = |
260 browser->tab_strip_model()->GetActiveWebContents(); | 260 browser->tab_strip_model()->GetActiveWebContents(); |
261 return contents->GetTopLevelNativeWindow(); | 261 return contents->GetTopLevelNativeWindow(); |
262 } | 262 } |
263 return NULL; | 263 return NULL; |
264 } | 264 } |
OLD | NEW |