| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/extensions/chrome/athena_extension_install_ui.h" | 5 #include "athena/extensions/chrome/athena_extension_install_ui.h" |
| 6 | 6 |
| 7 #include "base/i18n/rtl.h" | 7 #include "base/i18n/rtl.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/browser/extensions/extension_install_prompt.h" | 9 #include "chrome/browser/extensions/extension_install_prompt.h" |
| 10 #include "chrome/browser/profiles/profile.h" | 10 #include "chrome/browser/profiles/profile.h" |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 51 const extensions::Extension* extension, | 51 const extensions::Extension* extension, |
| 52 const SkBitmap* icon) { | 52 const SkBitmap* icon) { |
| 53 if (skip_post_install_ui_) | 53 if (skip_post_install_ui_) |
| 54 return; | 54 return; |
| 55 | 55 |
| 56 base::string16 extension_name = base::UTF8ToUTF16(extension->name()); | 56 base::string16 extension_name = base::UTF8ToUTF16(extension->name()); |
| 57 base::i18n::AdjustStringForLocaleDirection(&extension_name); | 57 base::i18n::AdjustStringForLocaleDirection(&extension_name); |
| 58 base::string16 message = l10n_util::GetStringFUTF16( | 58 base::string16 message = l10n_util::GetStringFUTF16( |
| 59 IDS_EXTENSION_INSTALLED_HEADING, extension_name); | 59 IDS_EXTENSION_INSTALLED_HEADING, extension_name); |
| 60 views::Widget* widget = views::DialogDelegate::CreateDialogWidget( | 60 views::Widget* widget = views::DialogDelegate::CreateDialogWidget( |
| 61 new MessageDialogDelegate(message), NULL, NULL); | 61 new MessageDialogDelegate(message), nullptr, nullptr); |
| 62 widget->Show(); | 62 widget->Show(); |
| 63 } | 63 } |
| 64 | 64 |
| 65 void AthenaExtensionInstallUI::OnInstallFailure( | 65 void AthenaExtensionInstallUI::OnInstallFailure( |
| 66 const extensions::CrxInstallerError& error) { | 66 const extensions::CrxInstallerError& error) { |
| 67 if (skip_post_install_ui_) | 67 if (skip_post_install_ui_) |
| 68 return; | 68 return; |
| 69 | 69 |
| 70 views::Widget* widget = views::DialogDelegate::CreateDialogWidget( | 70 views::Widget* widget = views::DialogDelegate::CreateDialogWidget( |
| 71 new MessageDialogDelegate(error.message()), NULL, NULL); | 71 new MessageDialogDelegate(error.message()), nullptr, nullptr); |
| 72 widget->Show(); | 72 widget->Show(); |
| 73 } | 73 } |
| 74 | 74 |
| 75 void AthenaExtensionInstallUI::SetUseAppInstalledBubble(bool use_bubble) { | 75 void AthenaExtensionInstallUI::SetUseAppInstalledBubble(bool use_bubble) { |
| 76 } | 76 } |
| 77 | 77 |
| 78 void AthenaExtensionInstallUI::OpenAppInstalledUI(const std::string& app_id) { | 78 void AthenaExtensionInstallUI::OpenAppInstalledUI(const std::string& app_id) { |
| 79 NOTREACHED(); | 79 NOTREACHED(); |
| 80 } | 80 } |
| 81 | 81 |
| 82 void AthenaExtensionInstallUI::SetSkipPostInstallUI(bool skip_ui) { | 82 void AthenaExtensionInstallUI::SetSkipPostInstallUI(bool skip_ui) { |
| 83 skip_post_install_ui_ = skip_ui; | 83 skip_post_install_ui_ = skip_ui; |
| 84 } | 84 } |
| 85 | 85 |
| 86 gfx::NativeWindow AthenaExtensionInstallUI::GetDefaultInstallDialogParent() { | 86 gfx::NativeWindow AthenaExtensionInstallUI::GetDefaultInstallDialogParent() { |
| 87 return NULL; | 87 return nullptr; |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace athena | 90 } // namespace athena |
| OLD | NEW |