| 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/extensions/extension_disabled_ui.h" | 5 #include "chrome/browser/extensions/extension_disabled_ui.h" |
| 6 | 6 |
| 7 #include <bitset> | 7 #include <bitset> |
| 8 #include <string> | 8 #include <string> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 360 } | 360 } |
| 361 | 361 |
| 362 bool ExtensionDisabledGlobalError::ShouldCloseOnDeactivate() const { | 362 bool ExtensionDisabledGlobalError::ShouldCloseOnDeactivate() const { |
| 363 // Since this indicates that an extension was disabled, we should definitely | 363 // Since this indicates that an extension was disabled, we should definitely |
| 364 // have the user acknowledge it, rather than having the bubble disappear when | 364 // have the user acknowledge it, rather than having the bubble disappear when |
| 365 // a new window pops up. | 365 // a new window pops up. |
| 366 return false; | 366 return false; |
| 367 } | 367 } |
| 368 | 368 |
| 369 void ExtensionDisabledGlobalError::ExtensionUninstallAccepted() { | 369 void ExtensionDisabledGlobalError::ExtensionUninstallAccepted() { |
| 370 service_->UninstallExtension( | 370 service_->UninstallExtension(extension_->id(), |
| 371 extension_->id(), extensions::UNINSTALL_REASON_EXTENSION_DISABLED, NULL); | 371 extensions::UNINSTALL_REASON_EXTENSION_DISABLED, |
| 372 base::Bind(&base::DoNothing), |
| 373 NULL); |
| 372 } | 374 } |
| 373 | 375 |
| 374 void ExtensionDisabledGlobalError::ExtensionUninstallCanceled() { | 376 void ExtensionDisabledGlobalError::ExtensionUninstallCanceled() { |
| 375 // Nothing happens, and the error is still there. | 377 // Nothing happens, and the error is still there. |
| 376 } | 378 } |
| 377 | 379 |
| 378 void ExtensionDisabledGlobalError::Observe( | 380 void ExtensionDisabledGlobalError::Observe( |
| 379 int type, | 381 int type, |
| 380 const content::NotificationSource& source, | 382 const content::NotificationSource& source, |
| 381 const content::NotificationDetails& details) { | 383 const content::NotificationDetails& details) { |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 437 void ShowExtensionDisabledDialog(ExtensionService* service, | 439 void ShowExtensionDisabledDialog(ExtensionService* service, |
| 438 content::WebContents* web_contents, | 440 content::WebContents* web_contents, |
| 439 const Extension* extension) { | 441 const Extension* extension) { |
| 440 scoped_ptr<ExtensionInstallPrompt> install_ui( | 442 scoped_ptr<ExtensionInstallPrompt> install_ui( |
| 441 new ExtensionInstallPrompt(web_contents)); | 443 new ExtensionInstallPrompt(web_contents)); |
| 442 // This object manages its own lifetime. | 444 // This object manages its own lifetime. |
| 443 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension); | 445 new ExtensionDisabledDialogDelegate(service, install_ui.Pass(), extension); |
| 444 } | 446 } |
| 445 | 447 |
| 446 } // namespace extensions | 448 } // namespace extensions |
| OLD | NEW |