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

Side by Side Diff: chrome/browser/ui/tests/ui_gfx_image_unittest.cc

Issue 1865213004: Convert //chrome/browser/ui from scoped_ptr to std::unique_ptr (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 8 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
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 "base/memory/scoped_ptr.h" 5 #include <memory>
6
6 #include "testing/gtest/include/gtest/gtest.h" 7 #include "testing/gtest/include/gtest/gtest.h"
7 #include "third_party/skia/include/core/SkBitmap.h" 8 #include "third_party/skia/include/core/SkBitmap.h"
8 #include "ui/gfx/image/image.h" 9 #include "ui/gfx/image/image.h"
9 #include "ui/gfx/image/image_unittest_util.h" 10 #include "ui/gfx/image/image_unittest_util.h"
10 11
11 #if defined(TOOLKIT_VIEWS) 12 #if defined(TOOLKIT_VIEWS)
12 #include "ui/views/controls/image_view.h" 13 #include "ui/views/controls/image_view.h"
13 #include "ui/views/view.h" 14 #include "ui/views/view.h"
14 #endif 15 #endif
15 16
16 namespace { 17 namespace {
17 18
18 #if defined(TOOLKIT_VIEWS) 19 #if defined(TOOLKIT_VIEWS)
19 TEST(UiGfxImageTest, ViewsImageView) { 20 TEST(UiGfxImageTest, ViewsImageView) {
20 gfx::Image image(gfx::test::CreatePlatformImage()); 21 gfx::Image image(gfx::test::CreatePlatformImage());
21 22
22 scoped_ptr<views::View> container(new views::View()); 23 std::unique_ptr<views::View> container(new views::View());
23 container->SetBounds(0, 0, 200, 200); 24 container->SetBounds(0, 0, 200, 200);
24 container->SetVisible(true); 25 container->SetVisible(true);
25 26
26 scoped_ptr<views::ImageView> image_view(new views::ImageView()); 27 std::unique_ptr<views::ImageView> image_view(new views::ImageView());
27 image_view->SetImage(*image.ToImageSkia()); 28 image_view->SetImage(*image.ToImageSkia());
28 container->AddChildView(image_view.get()); 29 container->AddChildView(image_view.get());
29 } 30 }
30 #endif 31 #endif
31 32
32 } // namespace 33 } // namespace
OLDNEW
« no previous file with comments | « chrome/browser/ui/task_manager/task_manager_table_model.h ('k') | chrome/browser/ui/toolbar/app_menu_icon_painter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698