| 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 <stddef.h> | 7 #include <stddef.h> |
| 8 #include <utility> | 8 #include <utility> |
| 9 | 9 |
| 10 #include "base/bind.h" | 10 #include "base/bind.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "chrome/browser/ui/global_error/global_error_service_factory.h" | 24 #include "chrome/browser/ui/global_error/global_error_service_factory.h" |
| 25 #include "chrome/browser/ui/tabs/tab_strip_model.h" | 25 #include "chrome/browser/ui/tabs/tab_strip_model.h" |
| 26 #include "chrome/grit/generated_resources.h" | 26 #include "chrome/grit/generated_resources.h" |
| 27 #include "extensions/browser/extension_registry.h" | 27 #include "extensions/browser/extension_registry.h" |
| 28 #include "extensions/browser/extension_system.h" | 28 #include "extensions/browser/extension_system.h" |
| 29 #include "extensions/browser/uninstall_reason.h" | 29 #include "extensions/browser/uninstall_reason.h" |
| 30 #include "extensions/common/constants.h" | 30 #include "extensions/common/constants.h" |
| 31 #include "extensions/common/extension.h" | 31 #include "extensions/common/extension.h" |
| 32 #include "ui/base/l10n/l10n_util.h" | 32 #include "ui/base/l10n/l10n_util.h" |
| 33 #include "ui/gfx/image/image.h" | 33 #include "ui/gfx/image/image.h" |
| 34 #include "ui/gfx/image/image_skia.h" |
| 34 #include "ui/gfx/image/image_skia_operations.h" | 35 #include "ui/gfx/image/image_skia_operations.h" |
| 35 | 36 |
| 36 namespace extensions { | 37 namespace extensions { |
| 37 | 38 |
| 38 namespace { | 39 namespace { |
| 39 | 40 |
| 40 // Return the menu label for a global error. | 41 // Return the menu label for a global error. |
| 41 base::string16 GetMenuItemLabel(const Extension* extension) { | 42 base::string16 GetMenuItemLabel(const Extension* extension) { |
| 42 if (!extension) | 43 if (!extension) |
| 43 return base::string16(); | 44 return base::string16(); |
| (...skipping 377 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 421 if (browser) | 422 if (browser) |
| 422 global_error_->ShowBubbleView(browser); | 423 global_error_->ShowBubbleView(browser); |
| 423 } else { | 424 } else { |
| 424 DCHECK(alert_type_ == MENU_ALERT); | 425 DCHECK(alert_type_ == MENU_ALERT); |
| 425 global_error_.reset(new ExternalInstallMenuAlert(this)); | 426 global_error_.reset(new ExternalInstallMenuAlert(this)); |
| 426 error_service_->AddGlobalError(global_error_.get()); | 427 error_service_->AddGlobalError(global_error_.get()); |
| 427 } | 428 } |
| 428 } | 429 } |
| 429 | 430 |
| 430 } // namespace extensions | 431 } // namespace extensions |
| OLD | NEW |