| 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_action_icon_factory.h" | 5 #include "chrome/browser/extensions/extension_action_icon_factory.h" |
| 6 | 6 |
| 7 #include "chrome/browser/extensions/extension_action.h" | 7 #include "chrome/browser/extensions/extension_action.h" |
| 8 #include "chrome/browser/profiles/profile.h" | 8 #include "chrome/browser/profiles/profile.h" |
| 9 #include "chrome/common/extensions/extension.h" | |
| 10 #include "chrome/common/extensions/extension_icon_set.h" | 9 #include "chrome/common/extensions/extension_icon_set.h" |
| 10 #include "extensions/common/extension.h" |
| 11 #include "grit/theme_resources.h" | 11 #include "grit/theme_resources.h" |
| 12 #include "ui/base/resource/resource_bundle.h" | 12 #include "ui/base/resource/resource_bundle.h" |
| 13 #include "ui/gfx/image/image_skia.h" | 13 #include "ui/gfx/image/image_skia.h" |
| 14 | 14 |
| 15 using extensions::Extension; | 15 using extensions::Extension; |
| 16 using extensions::IconImage; | 16 using extensions::IconImage; |
| 17 | 17 |
| 18 namespace { | 18 namespace { |
| 19 | 19 |
| 20 gfx::ImageSkia GetDefaultIcon() { | 20 gfx::ImageSkia GetDefaultIcon() { |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 gfx::ImageSkia ExtensionActionIconFactory::GetBaseIconFromAction(int tab_id) { | 59 gfx::ImageSkia ExtensionActionIconFactory::GetBaseIconFromAction(int tab_id) { |
| 60 gfx::ImageSkia icon = action_->GetExplicitlySetIcon(tab_id); | 60 gfx::ImageSkia icon = action_->GetExplicitlySetIcon(tab_id); |
| 61 if (!icon.isNull()) | 61 if (!icon.isNull()) |
| 62 return icon; | 62 return icon; |
| 63 | 63 |
| 64 if (default_icon_) | 64 if (default_icon_) |
| 65 return default_icon_->image_skia(); | 65 return default_icon_->image_skia(); |
| 66 | 66 |
| 67 return GetDefaultIcon(); | 67 return GetDefaultIcon(); |
| 68 } | 68 } |
| OLD | NEW |