| 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 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <set> | 8 #include <set> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| 11 #include "base/memory/scoped_ptr.h" | 11 #include "base/memory/scoped_ptr.h" |
| 12 #include "base/stl_util.h" | 12 #include "base/stl_util.h" |
| 13 #include "third_party/skia/include/core/SkBitmap.h" | 13 #include "third_party/skia/include/core/SkBitmap.h" |
| 14 #include "ui/gfx/geometry/size.h" |
| 14 #include "ui/gfx/image/image_png_rep.h" | 15 #include "ui/gfx/image/image_png_rep.h" |
| 15 #include "ui/gfx/image/image_skia.h" | 16 #include "ui/gfx/image/image_skia.h" |
| 16 #include "ui/gfx/image/image_skia_source.h" | 17 #include "ui/gfx/image/image_skia_source.h" |
| 17 #include "ui/gfx/size.h" | |
| 18 | 18 |
| 19 #if !defined(OS_IOS) | 19 #if !defined(OS_IOS) |
| 20 #include "ui/gfx/codec/png_codec.h" | 20 #include "ui/gfx/codec/png_codec.h" |
| 21 #endif | 21 #endif |
| 22 | 22 |
| 23 #if defined(OS_IOS) | 23 #if defined(OS_IOS) |
| 24 #include "base/mac/foundation_util.h" | 24 #include "base/mac/foundation_util.h" |
| 25 #include "ui/gfx/image/image_skia_util_ios.h" | 25 #include "ui/gfx/image/image_skia_util_ios.h" |
| 26 #elif defined(OS_MACOSX) | 26 #elif defined(OS_MACOSX) |
| 27 #include "base/mac/foundation_util.h" | 27 #include "base/mac/foundation_util.h" |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 753 } | 753 } |
| 754 return it->second; | 754 return it->second; |
| 755 } | 755 } |
| 756 | 756 |
| 757 void Image::AddRepresentation(internal::ImageRep* rep) const { | 757 void Image::AddRepresentation(internal::ImageRep* rep) const { |
| 758 CHECK(storage_.get()); | 758 CHECK(storage_.get()); |
| 759 storage_->representations().insert(std::make_pair(rep->type(), rep)); | 759 storage_->representations().insert(std::make_pair(rep->type(), rep)); |
| 760 } | 760 } |
| 761 | 761 |
| 762 } // namespace gfx | 762 } // namespace gfx |
| OLD | NEW |