| 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/macros.h" | 8 #include "base/macros.h" |
| 9 #include "base/strings/utf_string_conversions.h" | 9 #include "base/strings/utf_string_conversions.h" |
| 10 #include "build/build_config.h" | 10 #include "build/build_config.h" |
| (...skipping 81 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 92 | 92 |
| 93 extensions::CrxInstallError error_; | 93 extensions::CrxInstallError error_; |
| 94 | 94 |
| 95 DISALLOW_COPY_AND_ASSIGN(ErrorInfoBarDelegate); | 95 DISALLOW_COPY_AND_ASSIGN(ErrorInfoBarDelegate); |
| 96 }; | 96 }; |
| 97 | 97 |
| 98 // static | 98 // static |
| 99 void ErrorInfoBarDelegate::Create(InfoBarService* infobar_service, | 99 void ErrorInfoBarDelegate::Create(InfoBarService* infobar_service, |
| 100 const extensions::CrxInstallError& error) { | 100 const extensions::CrxInstallError& error) { |
| 101 infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar( | 101 infobar_service->AddInfoBar(infobar_service->CreateConfirmInfoBar( |
| 102 scoped_ptr<ConfirmInfoBarDelegate>(new ErrorInfoBarDelegate(error)))); | 102 std::unique_ptr<ConfirmInfoBarDelegate>( |
| 103 new ErrorInfoBarDelegate(error)))); |
| 103 } | 104 } |
| 104 | 105 |
| 105 ErrorInfoBarDelegate::ErrorInfoBarDelegate( | 106 ErrorInfoBarDelegate::ErrorInfoBarDelegate( |
| 106 const extensions::CrxInstallError& error) | 107 const extensions::CrxInstallError& error) |
| 107 : ConfirmInfoBarDelegate(), error_(error) { | 108 : ConfirmInfoBarDelegate(), error_(error) { |
| 108 } | 109 } |
| 109 | 110 |
| 110 ErrorInfoBarDelegate::~ErrorInfoBarDelegate() { | 111 ErrorInfoBarDelegate::~ErrorInfoBarDelegate() { |
| 111 } | 112 } |
| 112 | 113 |
| (...skipping 139 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 252 | 253 |
| 253 gfx::NativeWindow ExtensionInstallUIDefault::GetDefaultInstallDialogParent() { | 254 gfx::NativeWindow ExtensionInstallUIDefault::GetDefaultInstallDialogParent() { |
| 254 Browser* browser = chrome::FindLastActiveWithProfile(profile_); | 255 Browser* browser = chrome::FindLastActiveWithProfile(profile_); |
| 255 if (browser) { | 256 if (browser) { |
| 256 content::WebContents* contents = | 257 content::WebContents* contents = |
| 257 browser->tab_strip_model()->GetActiveWebContents(); | 258 browser->tab_strip_model()->GetActiveWebContents(); |
| 258 return contents->GetTopLevelNativeWindow(); | 259 return contents->GetTopLevelNativeWindow(); |
| 259 } | 260 } |
| 260 return NULL; | 261 return NULL; |
| 261 } | 262 } |
| OLD | NEW |