| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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/cocoa/extensions/bundle_util.h" | 5 #include "chrome/browser/ui/cocoa/extensions/bundle_util.h" |
| 6 | 6 |
| 7 #include "base/mac/mac_util.h" | 7 #include "base/mac/mac_util.h" |
| 8 #include "base/mac/scoped_nsobject.h" | 8 #include "base/mac/scoped_nsobject.h" |
| 9 #include "base/strings/sys_string_conversions.h" | 9 #include "base/strings/sys_string_conversions.h" |
| 10 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" |
| 10 #include "ui/gfx/image/image_skia.h" | 11 #include "ui/gfx/image/image_skia.h" |
| 11 #include "ui/gfx/image/image_skia_util_mac.h" | 12 #include "ui/gfx/image/image_skia_util_mac.h" |
| 12 #import "third_party/google_toolbox_for_mac/src/AppKit/GTMUILocalizerAndLayoutTw
eaker.h" | |
| 13 | 13 |
| 14 namespace { | 14 namespace { |
| 15 | 15 |
| 16 const CGFloat kExtensionIconSize = 32; | 16 const CGFloat kExtensionIconSize = 32; |
| 17 | 17 |
| 18 } // namespace | 18 } // namespace |
| 19 | 19 |
| 20 CGFloat PopulateBundleItemsList( | 20 CGFloat PopulateBundleItemsList( |
| 21 const extensions::BundleInstaller::ItemList& items, | 21 const extensions::BundleInstaller::ItemList& items, |
| 22 NSView* items_field) { | 22 NSView* items_field) { |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 [[NSImageView alloc] initWithFrame:icon_frame]); | 55 [[NSImageView alloc] initWithFrame:icon_frame]); |
| 56 [icon_view setImage:image]; | 56 [icon_view setImage:image]; |
| 57 | 57 |
| 58 [items_field addSubview:icon_view]; | 58 [items_field addSubview:icon_view]; |
| 59 [items_field addSubview:title_view]; | 59 [items_field addSubview:title_view]; |
| 60 | 60 |
| 61 offset = NSMaxY(NSUnionRect(title_frame, icon_frame)); | 61 offset = NSMaxY(NSUnionRect(title_frame, icon_frame)); |
| 62 } | 62 } |
| 63 return offset; | 63 return offset; |
| 64 } | 64 } |
| OLD | NEW |