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

Unified Diff: chrome/browser/ui/views/apps/shaped_app_window_targeter_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 side-by-side diff with in-line comments
Download patch
Index: chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
diff --git a/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc b/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
index 79c08bf370de03a0fada0b82cf88faac2179f9ef..88a0bbcb2103e3c8930266b1ce3123cfc9e15923 100644
--- a/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
+++ b/chrome/browser/ui/views/apps/shaped_app_window_targeter_unittest.cc
@@ -56,7 +56,7 @@ class ShapedAppWindowTargeterTest : public aura::test::AuraTestBase {
private:
views::WebView web_view_;
- scoped_ptr<views::Widget> widget_;
+ std::unique_ptr<views::Widget> widget_;
ChromeNativeAppWindowViewsAura app_window_;
DISALLOW_COPY_AND_ASSIGN(ShapedAppWindowTargeterTest);
@@ -76,7 +76,7 @@ TEST_F(ShapedAppWindowTargeterTest, HitTestBasic) {
EXPECT_EQ(window, move.target());
}
- scoped_ptr<SkRegion> region(new SkRegion);
+ std::unique_ptr<SkRegion> region(new SkRegion);
region->op(SkIRect::MakeXYWH(0, 0, 0, 0), SkRegion::kUnion_Op);
app_window()->UpdateShape(std::move(region));
{
@@ -130,7 +130,7 @@ TEST_F(ShapedAppWindowTargeterTest, HitTestOnlyForShapedWindow) {
// receive events outside of its bounds. Verify that this window-targeter is
// active unless the window has a custom shape.
gfx::Insets inset(-30);
- root_window()->SetEventTargeter(scoped_ptr<ui::EventTargeter>(
+ root_window()->SetEventTargeter(std::unique_ptr<ui::EventTargeter>(
new wm::EasyResizeWindowTargeter(root_window(), inset, inset)));
aura::Window* window = widget()->GetNativeWindow();
@@ -158,7 +158,7 @@ TEST_F(ShapedAppWindowTargeterTest, HitTestOnlyForShapedWindow) {
EXPECT_EQ(window, move.target());
}
- scoped_ptr<SkRegion> region(new SkRegion);
+ std::unique_ptr<SkRegion> region(new SkRegion);
region->op(SkIRect::MakeXYWH(40, 0, 20, 100), SkRegion::kUnion_Op);
region->op(SkIRect::MakeXYWH(0, 40, 100, 20), SkRegion::kUnion_Op);
app_window()->UpdateShape(std::move(region));
@@ -176,7 +176,7 @@ TEST_F(ShapedAppWindowTargeterTest, HitTestOnlyForShapedWindow) {
// Remove the custom shape. This should restore the behaviour of targeting the
// app window for events just outside its bounds.
- app_window()->UpdateShape(scoped_ptr<SkRegion>());
+ app_window()->UpdateShape(std::unique_ptr<SkRegion>());
{
ui::MouseEvent move(ui::ET_MOUSE_MOVED, gfx::Point(10, 10),
gfx::Point(10, 10), ui::EventTimeForNow(), ui::EF_NONE,
@@ -218,7 +218,7 @@ TEST_F(ShapedAppWindowTargeterTest, ResizeInsetsWithinBounds) {
#if !defined(OS_CHROMEOS)
// The non standard app frame has a easy resize targetter installed.
- scoped_ptr<views::NonClientFrameView> frame(
+ std::unique_ptr<views::NonClientFrameView> frame(
app_window_views()->CreateNonStandardAppFrame());
{
// Ensure that the window has an event targeter (there should be an
« no previous file with comments | « chrome/browser/ui/views/apps/chrome_native_app_window_views_aura_ash.cc ('k') | chrome/browser/ui/views/ash/tab_scrubber.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698