| 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 "chrome/browser/extensions/external_install_error.h" | 5 #include "chrome/browser/extensions/external_install_error.h" |
| 6 | 6 |
| 7 #include "base/bind.h" | 7 #include "base/bind.h" |
| 8 #include "base/strings/utf_string_conversions.h" | 8 #include "base/strings/utf_string_conversions.h" |
| 9 #include "chrome/app/chrome_command_ids.h" | 9 #include "chrome/app/chrome_command_ids.h" |
| 10 #include "chrome/browser/extensions/extension_service.h" | 10 #include "chrome/browser/extensions/extension_service.h" |
| 11 #include "chrome/browser/extensions/external_install_manager.h" | 11 #include "chrome/browser/extensions/external_install_manager.h" |
| 12 #include "chrome/browser/extensions/webstore_data_fetcher.h" | 12 #include "chrome/browser/extensions/webstore_data_fetcher.h" |
| 13 #include "chrome/browser/profiles/profile.h" | 13 #include "chrome/browser/profiles/profile.h" |
| 14 #include "chrome/browser/ui/browser.h" | 14 #include "chrome/browser/ui/browser.h" |
| 15 #include "chrome/browser/ui/browser_finder.h" | 15 #include "chrome/browser/ui/browser_finder.h" |
| 16 #include "chrome/browser/ui/global_error/global_error.h" | 16 #include "chrome/browser/ui/global_error/global_error.h" |
| 17 #include "chrome/browser/ui/global_error/global_error_service.h" | 17 #include "chrome/browser/ui/global_error/global_error_service.h" |
| 18 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 18 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 19 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 20 #include "chrome/grit/generated_resources.h" |
| 20 #include "extensions/browser/extension_registry.h" | 21 #include "extensions/browser/extension_registry.h" |
| 21 #include "extensions/browser/extension_system.h" | 22 #include "extensions/browser/extension_system.h" |
| 22 #include "extensions/browser/uninstall_reason.h" | 23 #include "extensions/browser/uninstall_reason.h" |
| 23 #include "extensions/common/constants.h" | 24 #include "extensions/common/constants.h" |
| 24 #include "extensions/common/extension.h" | 25 #include "extensions/common/extension.h" |
| 25 #include "grit/generated_resources.h" | |
| 26 #include "ui/base/l10n/l10n_util.h" | 26 #include "ui/base/l10n/l10n_util.h" |
| 27 #include "ui/gfx/image/image.h" | 27 #include "ui/gfx/image/image.h" |
| 28 #include "ui/gfx/image/image_skia_operations.h" | 28 #include "ui/gfx/image/image_skia_operations.h" |
| 29 | 29 |
| 30 namespace extensions { | 30 namespace extensions { |
| 31 | 31 |
| 32 namespace { | 32 namespace { |
| 33 | 33 |
| 34 // Return the menu label for a global error. | 34 // Return the menu label for a global error. |
| 35 base::string16 GetMenuItemLabel(const Extension* extension) { | 35 base::string16 GetMenuItemLabel(const Extension* extension) { |
| (...skipping 343 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 379 if (browser) | 379 if (browser) |
| 380 global_error_->ShowBubbleView(browser); | 380 global_error_->ShowBubbleView(browser); |
| 381 } else { | 381 } else { |
| 382 DCHECK(alert_type_ == MENU_ALERT); | 382 DCHECK(alert_type_ == MENU_ALERT); |
| 383 global_error_.reset(new ExternalInstallMenuAlert(this)); | 383 global_error_.reset(new ExternalInstallMenuAlert(this)); |
| 384 error_service_->AddGlobalError(global_error_.get()); | 384 error_service_->AddGlobalError(global_error_.get()); |
| 385 } | 385 } |
| 386 } | 386 } |
| 387 | 387 |
| 388 } // namespace extensions | 388 } // namespace extensions |
| OLD | NEW |