| Index: chrome/browser/cocoa/menu_controller.mm
|
| diff --git a/chrome/browser/cocoa/menu_controller.mm b/chrome/browser/cocoa/menu_controller.mm
|
| index 047c8dd5b02f6adbe76038661da4f09d3b3d30dc..5315944e63910a3160e6202f24c7f7ee25dbae40 100644
|
| --- a/chrome/browser/cocoa/menu_controller.mm
|
| +++ b/chrome/browser/cocoa/menu_controller.mm
|
| @@ -9,6 +9,7 @@
|
| #include "app/menus/simple_menu_model.h"
|
| #include "base/logging.h"
|
| #include "base/sys_string_conversions.h"
|
| +#include "skia/ext/skia_utils_mac.h"
|
|
|
| @interface MenuController (Private)
|
| - (NSMenu*)menuFromModel:(menus::MenuModel*)model;
|
| @@ -86,6 +87,16 @@
|
| [[NSMenuItem alloc] initWithTitle:label
|
| action:@selector(itemSelected:)
|
| keyEquivalent:@""]);
|
| +
|
| + // If the menu item has an icon, set it.
|
| + SkBitmap skiaIcon;
|
| + if (model->GetIconAt(modelIndex, &skiaIcon) && !skiaIcon.isNull()) {
|
| + NSImage* icon = gfx::SkBitmapToNSImage(skiaIcon);
|
| + if (icon) {
|
| + [item setImage:icon];
|
| + }
|
| + }
|
| +
|
| menus::MenuModel::ItemType type = model->GetTypeAt(modelIndex);
|
| if (type == menus::MenuModel::TYPE_SUBMENU) {
|
| // Recursively build a submenu from the sub-model at this index.
|
|
|