| Index: ui/gfx/icon_util.cc
|
| diff --git a/ui/gfx/icon_util.cc b/ui/gfx/icon_util.cc
|
| index 092ab68c14530dc820d9fdc62d01e5ec845600bd..8276a20ce99e29261807471b38010b31d33a2cea 100644
|
| --- a/ui/gfx/icon_util.cc
|
| +++ b/ui/gfx/icon_util.cc
|
| @@ -4,11 +4,12 @@
|
|
|
| #include "ui/gfx/icon_util.h"
|
|
|
| +#include <memory>
|
| +
|
| #include "base/files/file_util.h"
|
| #include "base/files/important_file_writer.h"
|
| #include "base/logging.h"
|
| #include "base/macros.h"
|
| -#include "base/memory/scoped_ptr.h"
|
| #include "base/trace_event/trace_event.h"
|
| #include "base/win/resource_util.h"
|
| #include "base/win/scoped_gdi_object.h"
|
| @@ -204,7 +205,7 @@ base::win::ScopedHICON IconUtil::CreateHICONFromSkBitmap(
|
| PixelsHaveAlpha(static_cast<const uint32_t*>(bitmap.getPixels()),
|
| bitmap.width() * bitmap.height());
|
|
|
| - scoped_ptr<uint8_t[]> mask_bits;
|
| + std::unique_ptr<uint8_t[]> mask_bits;
|
| if (!bitmap_has_alpha_channel) {
|
| // Bytes per line with paddings to make it word alignment.
|
| size_t bytes_per_line = (bitmap.width() + 0xF) / 16 * 2;
|
| @@ -246,7 +247,7 @@ SkBitmap* IconUtil::CreateSkBitmapFromHICON(HICON icon, const gfx::Size& s) {
|
| }
|
|
|
| // static
|
| -scoped_ptr<gfx::ImageFamily> IconUtil::CreateImageFamilyFromIconResource(
|
| +std::unique_ptr<gfx::ImageFamily> IconUtil::CreateImageFamilyFromIconResource(
|
| HMODULE module,
|
| int resource_id) {
|
| // Read the resource directly so we can get the icon image sizes. This data
|
| @@ -262,7 +263,7 @@ scoped_ptr<gfx::ImageFamily> IconUtil::CreateImageFamilyFromIconResource(
|
|
|
| const GRPICONDIR* icon_dir =
|
| reinterpret_cast<const GRPICONDIR*>(icon_dir_data);
|
| - scoped_ptr<gfx::ImageFamily> result(new gfx::ImageFamily);
|
| + std::unique_ptr<gfx::ImageFamily> result(new gfx::ImageFamily);
|
| for (size_t i = 0; i < icon_dir->idCount; ++i) {
|
| const GRPICONDIRENTRY* entry = &icon_dir->idEntries[i];
|
| if (entry->bWidth != 0 || entry->bHeight != 0) {
|
| @@ -274,7 +275,7 @@ scoped_ptr<gfx::ImageFamily> IconUtil::CreateImageFamilyFromIconResource(
|
| base::win::ScopedHICON icon_handle(static_cast<HICON>(LoadImage(
|
| module, MAKEINTRESOURCE(resource_id), IMAGE_ICON, entry->bWidth,
|
| entry->bHeight, LR_DEFAULTCOLOR | LR_DEFAULTSIZE)));
|
| - scoped_ptr<SkBitmap> bitmap(
|
| + std::unique_ptr<SkBitmap> bitmap(
|
| IconUtil::CreateSkBitmapFromHICON(icon_handle.get()));
|
| result->Add(gfx::Image::CreateFrom1xBitmap(*bitmap));
|
| } else {
|
| @@ -412,7 +413,7 @@ SkBitmap IconUtil::CreateSkBitmapFromHICONHelper(HICON icon,
|
|
|
| // Capture boolean opacity. We may not use it if we find out the bitmap has
|
| // an alpha channel.
|
| - scoped_ptr<bool[]> opaque(new bool[num_pixels]);
|
| + std::unique_ptr<bool[]> opaque(new bool[num_pixels]);
|
| for (size_t i = 0; i < num_pixels; ++i)
|
| opaque[i] = !bits[i];
|
|
|
|
|