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/extension_install_prompt.h" | 10 #include "chrome/browser/extensions/extension_install_prompt.h" |
(...skipping 115 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
126 return (error_.type() == extensions::CrxInstallerError::ERROR_OFF_STORE) ? | 126 return (error_.type() == extensions::CrxInstallerError::ERROR_OFF_STORE) ? |
127 l10n_util::GetStringUTF16(IDS_LEARN_MORE) : base::string16(); | 127 l10n_util::GetStringUTF16(IDS_LEARN_MORE) : base::string16(); |
128 } | 128 } |
129 | 129 |
130 bool ErrorInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { | 130 bool ErrorInfoBarDelegate::LinkClicked(WindowOpenDisposition disposition) { |
131 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( | 131 InfoBarService::WebContentsFromInfoBar(infobar())->OpenURL( |
132 content::OpenURLParams( | 132 content::OpenURLParams( |
133 GURL("http://support.google.com/chrome_webstore/?p=crx_warning"), | 133 GURL("http://support.google.com/chrome_webstore/?p=crx_warning"), |
134 content::Referrer(), | 134 content::Referrer(), |
135 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, | 135 (disposition == CURRENT_TAB) ? NEW_FOREGROUND_TAB : disposition, |
136 content::PAGE_TRANSITION_LINK, false)); | 136 ui::PAGE_TRANSITION_LINK, false)); |
137 return false; | 137 return false; |
138 } | 138 } |
139 | 139 |
140 } // namespace | 140 } // namespace |
141 | 141 |
142 | 142 |
143 // ExtensionInstallUI --------------------------------------------------------- | 143 // ExtensionInstallUI --------------------------------------------------------- |
144 | 144 |
145 // static | 145 // static |
146 ExtensionInstallUI* ExtensionInstallUI::Create(Profile* profile) { | 146 ExtensionInstallUI* ExtensionInstallUI::Create(Profile* profile) { |
(...skipping 137 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 browser->tab_strip_model()->GetActiveWebContents(); | 284 browser->tab_strip_model()->GetActiveWebContents(); |
285 if (!web_contents) | 285 if (!web_contents) |
286 return; | 286 return; |
287 ErrorInfoBarDelegate::Create(InfoBarService::FromWebContents(web_contents), | 287 ErrorInfoBarDelegate::Create(InfoBarService::FromWebContents(web_contents), |
288 error); | 288 error); |
289 } | 289 } |
290 | 290 |
291 void ExtensionInstallUIDefault::SetUseAppInstalledBubble(bool use_bubble) { | 291 void ExtensionInstallUIDefault::SetUseAppInstalledBubble(bool use_bubble) { |
292 use_app_installed_bubble_ = use_bubble; | 292 use_app_installed_bubble_ = use_bubble; |
293 } | 293 } |
OLD | NEW |