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 "ui/gfx/image/image.h" | 5 #include "ui/gfx/image/image.h" |
6 | 6 |
7 #import <AppKit/AppKit.h> | 7 #import <AppKit/AppKit.h> |
| 8 #include <stddef.h> |
8 | 9 |
9 #include "base/logging.h" | 10 #include "base/logging.h" |
10 #include "base/mac/scoped_nsobject.h" | 11 #include "base/mac/scoped_nsobject.h" |
11 #include "ui/gfx/geometry/size.h" | 12 #include "ui/gfx/geometry/size.h" |
12 #include "ui/gfx/image/image_png_rep.h" | 13 #include "ui/gfx/image/image_png_rep.h" |
13 | 14 |
14 namespace gfx { | 15 namespace gfx { |
15 namespace internal { | 16 namespace internal { |
16 | 17 |
17 namespace { | 18 namespace { |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
102 gfx::Size NSImageSize(NSImage* image) { | 103 gfx::Size NSImageSize(NSImage* image) { |
103 NSSize size = [image size]; | 104 NSSize size = [image size]; |
104 int width = static_cast<int>(size.width); | 105 int width = static_cast<int>(size.width); |
105 int height = static_cast<int>(size.height); | 106 int height = static_cast<int>(size.height); |
106 return gfx::Size(width, height); | 107 return gfx::Size(width, height); |
107 } | 108 } |
108 | 109 |
109 } // namespace internal | 110 } // namespace internal |
110 } // namespace gfx | 111 } // namespace gfx |
111 | 112 |
OLD | NEW |