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