| 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" |
| 11 #include "chrome/grit/chromium_strings.h" | 11 #include "chrome/grit/chromium_strings.h" |
| 12 #include "extensions/browser/install/crx_installer_error.h" | 12 #include "extensions/browser/install/crx_installer_error.h" |
| 13 #include "extensions/common/extension.h" | 13 #include "extensions/common/extension.h" |
| 14 #include "ui/base/l10n/l10n_util.h" | 14 #include "ui/base/l10n/l10n_util.h" |
| 15 #include "ui/views/widget/widget.h" | 15 #include "ui/views/widget/widget.h" |
| 16 #include "ui/views/window/dialog_delegate.h" | 16 #include "ui/views/window/dialog_delegate.h" |
| 17 | 17 |
| 18 namespace athena { | 18 namespace athena { |
| 19 | 19 |
| 20 namespace { | 20 namespace { |
| 21 | 21 |
| 22 // Dialog delegate which displays a message and an 'OK' button. | 22 // Dialog delegate which displays a message and an 'OK' button. |
| 23 class MessageDialogDelegate : public views::DialogDelegateView { | 23 class MessageDialogDelegate : public views::DialogDelegateView { |
| 24 public: | 24 public: |
| 25 explicit MessageDialogDelegate(const base::string16& message) | 25 explicit MessageDialogDelegate(const base::string16& message) |
| 26 : message_(message) {} | 26 : message_(message) {} |
| 27 | 27 |
| 28 virtual ~MessageDialogDelegate() {} | 28 ~MessageDialogDelegate() override {} |
| 29 | 29 |
| 30 // views::DialogDelegateView: | 30 // views::DialogDelegateView: |
| 31 virtual base::string16 GetWindowTitle() const override { return message_; } | 31 base::string16 GetWindowTitle() const override { return message_; } |
| 32 | 32 |
| 33 virtual int GetDialogButtons() const override { return ui::DIALOG_BUTTON_OK; } | 33 int GetDialogButtons() const override { return ui::DIALOG_BUTTON_OK; } |
| 34 | 34 |
| 35 private: | 35 private: |
| 36 base::string16 message_; | 36 base::string16 message_; |
| 37 | 37 |
| 38 DISALLOW_COPY_AND_ASSIGN(MessageDialogDelegate); | 38 DISALLOW_COPY_AND_ASSIGN(MessageDialogDelegate); |
| 39 }; | 39 }; |
| 40 | 40 |
| 41 } // namespace | 41 } // namespace |
| 42 | 42 |
| 43 AthenaExtensionInstallUI::AthenaExtensionInstallUI() | 43 AthenaExtensionInstallUI::AthenaExtensionInstallUI() |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 nullptr; | 87 return nullptr; |
| 88 } | 88 } |
| 89 | 89 |
| 90 } // namespace athena | 90 } // namespace athena |
| OLD | NEW |