Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(401)

Side by Side Diff: ui/gfx/image/image.cc

Issue 9586018: Add support for multiple icon sizes for Mac platform apps (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix build Created 8 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « ui/gfx/image/image.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/stl_util.h" 10 #include "base/stl_util.h"
(...skipping 289 matching lines...) Expand 10 before | Expand all | Expand 10 after
300 } 300 }
301 #endif 301 #endif
302 302
303 #if defined(OS_MACOSX) 303 #if defined(OS_MACOSX)
304 NSImage* Image::ToNSImage() const { 304 NSImage* Image::ToNSImage() const {
305 internal::ImageRep* rep = GetRepresentation(Image::kImageRepCocoa); 305 internal::ImageRep* rep = GetRepresentation(Image::kImageRepCocoa);
306 return rep->AsImageRepCocoa()->image(); 306 return rep->AsImageRepCocoa()->image();
307 } 307 }
308 #endif 308 #endif
309 309
310 const SkBitmap* Image::CopySkBitmap() const { 310 SkBitmap* Image::CopySkBitmap() const {
311 return new SkBitmap(*ToSkBitmap()); 311 return new SkBitmap(*ToSkBitmap());
312 } 312 }
313 313
314 #if defined(TOOLKIT_USES_GTK) 314 #if defined(TOOLKIT_USES_GTK)
315 GdkPixbuf* Image::CopyGdkPixbuf() const { 315 GdkPixbuf* Image::CopyGdkPixbuf() const {
316 GdkPixbuf* pixbuf = ToGdkPixbuf(); 316 GdkPixbuf* pixbuf = ToGdkPixbuf();
317 g_object_ref(pixbuf); 317 g_object_ref(pixbuf);
318 return pixbuf; 318 return pixbuf;
319 } 319 }
320 #endif 320 #endif
(...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after
466 return GetRepresentation(Image::kImageRepSkia)->AsImageRepSkia()-> 466 return GetRepresentation(Image::kImageRepSkia)->AsImageRepSkia()->
467 bitmaps().size(); 467 bitmaps().size();
468 } 468 }
469 469
470 const SkBitmap* Image::GetSkBitmapAtIndex(size_t index) const { 470 const SkBitmap* Image::GetSkBitmapAtIndex(size_t index) const {
471 return GetRepresentation(Image::kImageRepSkia)->AsImageRepSkia()-> 471 return GetRepresentation(Image::kImageRepSkia)->AsImageRepSkia()->
472 bitmaps()[index]; 472 bitmaps()[index];
473 } 473 }
474 474
475 } // namespace gfx 475 } // namespace gfx
OLDNEW
« no previous file with comments | « ui/gfx/image/image.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698