| 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/ui/ash/launcher/launcher_app_icon_loader.h" | 5 #include "chrome/browser/ui/ash/launcher/launcher_app_icon_loader.h" |
| 6 | 6 |
| 7 #include "base/stl_util.h" | 7 #include "base/stl_util.h" |
| 8 #include "chrome/browser/extensions/extension_service.h" | 8 #include "chrome/browser/extensions/extension_service.h" |
| 9 #include "chrome/browser/profiles/profile.h" | 9 #include "chrome/browser/profiles/profile.h" |
| 10 #include "chrome/browser/ui/tab_contents/tab_contents.h" | |
| 11 #include "chrome/common/extensions/extension.h" | 10 #include "chrome/common/extensions/extension.h" |
| 12 #include "chrome/common/extensions/extension_constants.h" | 11 #include "chrome/common/extensions/extension_constants.h" |
| 13 | 12 |
| 14 namespace { | 13 namespace { |
| 15 | 14 |
| 16 const extensions::Extension* GetExtensionByID(Profile* profile, | 15 const extensions::Extension* GetExtensionByID(Profile* profile, |
| 17 const std::string& id) { | 16 const std::string& id) { |
| 18 ExtensionService* service = profile->GetExtensionService(); | 17 ExtensionService* service = profile->GetExtensionService(); |
| 19 if (!service) | 18 if (!service) |
| 20 return NULL; | 19 return NULL; |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 } | 72 } |
| 74 | 73 |
| 75 void LauncherAppIconLoader::OnExtensionIconImageChanged( | 74 void LauncherAppIconLoader::OnExtensionIconImageChanged( |
| 76 extensions::IconImage* image) { | 75 extensions::IconImage* image) { |
| 77 ImageToExtensionIDMap::iterator i = map_.find(image); | 76 ImageToExtensionIDMap::iterator i = map_.find(image); |
| 78 if (i == map_.end()) | 77 if (i == map_.end()) |
| 79 return; // The image has been removed, do nothing. | 78 return; // The image has been removed, do nothing. |
| 80 | 79 |
| 81 host_->SetAppImage(i->second, image->image_skia()); | 80 host_->SetAppImage(i->second, image->image_skia()); |
| 82 } | 81 } |
| OLD | NEW |