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

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

Issue 9815006: ui/gfx: Remove the deprecated "operator const GdkPixbuf*" from Image API. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: 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 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 NSImage* image = ToNSImage(); 323 NSImage* image = ToNSImage();
324 base::mac::NSObjectRetain(image); 324 base::mac::NSObjectRetain(image);
325 return image; 325 return image;
326 } 326 }
327 #endif 327 #endif
328 328
329 Image::operator const SkBitmap&() const { 329 Image::operator const SkBitmap&() const {
330 return *ToSkBitmap(); 330 return *ToSkBitmap();
331 } 331 }
332 332
333 #if defined(TOOLKIT_USES_GTK)
334 Image::operator GdkPixbuf*() const {
335 return ToGdkPixbuf();
336 }
337 #endif
338
339 #if defined(OS_MACOSX) 333 #if defined(OS_MACOSX)
340 Image::operator NSImage*() const { 334 Image::operator NSImage*() const {
341 return ToNSImage(); 335 return ToNSImage();
342 } 336 }
343 #endif 337 #endif
344 338
345 bool Image::HasRepresentation(RepresentationType type) const { 339 bool Image::HasRepresentation(RepresentationType type) const {
346 return storage_.get() && storage_->representations().count(type) != 0; 340 return storage_.get() && storage_->representations().count(type) != 0;
347 } 341 }
348 342
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after
461 return GetRepresentation(Image::kImageRepSkia)->AsImageRepSkia()-> 455 return GetRepresentation(Image::kImageRepSkia)->AsImageRepSkia()->
462 bitmaps().size(); 456 bitmaps().size();
463 } 457 }
464 458
465 const SkBitmap* Image::GetSkBitmapAtIndex(size_t index) const { 459 const SkBitmap* Image::GetSkBitmapAtIndex(size_t index) const {
466 return GetRepresentation(Image::kImageRepSkia)->AsImageRepSkia()-> 460 return GetRepresentation(Image::kImageRepSkia)->AsImageRepSkia()->
467 bitmaps()[index]; 461 bitmaps()[index];
468 } 462 }
469 463
470 } // namespace gfx 464 } // 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