Index: ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc |
diff --git a/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc b/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc |
index 46357f60f0093af2b1ee80265196eff9d348e21f..2bb919bb4dfa77189bdb2ba0206b7eab3caec192 100644 |
--- a/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc |
+++ b/ui/views/widget/desktop_aura/x11_topmost_window_finder_interactive_uitest.cc |
@@ -4,11 +4,13 @@ |
#include "ui/views/widget/desktop_aura/x11_topmost_window_finder.h" |
-#include <stddef.h> |
-#include <X11/extensions/shape.h> |
#include <X11/Xlib.h> |
#include <X11/Xregion.h> |
+#include <X11/extensions/shape.h> |
+#include <stddef.h> |
+ |
#include <algorithm> |
+#include <memory> |
#include <vector> |
// Get rid of X11 macros which conflict with gtest. |
@@ -16,7 +18,6 @@ |
#undef None |
#include "base/macros.h" |
-#include "base/memory/scoped_ptr.h" |
#include "base/path_service.h" |
#include "third_party/skia/include/core/SkRect.h" |
#include "third_party/skia/include/core/SkRegion.h" |
@@ -62,7 +63,7 @@ class MinimizeWaiter : public X11PropertyChangeWaiter { |
return true; |
} |
- scoped_ptr<ui::X11AtomCache> atom_cache_; |
+ std::unique_ptr<ui::X11AtomCache> atom_cache_; |
DISALLOW_COPY_AND_ASSIGN(MinimizeWaiter); |
}; |
@@ -118,8 +119,8 @@ class X11TopmostWindowFinderTest : public ViewsTestBase { |
// Creates and shows a Widget with |bounds|. The caller takes ownership of |
// the returned widget. |
- scoped_ptr<Widget> CreateAndShowWidget(const gfx::Rect& bounds) { |
- scoped_ptr<Widget> toplevel(new Widget); |
+ std::unique_ptr<Widget> CreateAndShowWidget(const gfx::Rect& bounds) { |
+ std::unique_ptr<Widget> toplevel(new Widget); |
Widget::InitParams params = CreateParams(Widget::InitParams::TYPE_WINDOW); |
params.ownership = Widget::InitParams::WIDGET_OWNS_NATIVE_WIDGET; |
params.native_widget = new DesktopNativeWidgetAura(toplevel.get()); |
@@ -226,14 +227,14 @@ TEST_F(X11TopmostWindowFinderTest, Basic) { |
// Avoid positioning test windows at 0x0 because window managers often have a |
// panel/launcher along one of the screen edges and do not allow windows to |
// position themselves to overlap the panel/launcher. |
- scoped_ptr<Widget> widget1( |
+ std::unique_ptr<Widget> widget1( |
CreateAndShowWidget(gfx::Rect(100, 100, 200, 100))); |
aura::Window* window1 = widget1->GetNativeWindow(); |
XID xid1 = window1->GetHost()->GetAcceleratedWidget(); |
XID xid2 = CreateAndShowXWindow(gfx::Rect(200, 100, 100, 200)); |
- scoped_ptr<Widget> widget3( |
+ std::unique_ptr<Widget> widget3( |
CreateAndShowWidget(gfx::Rect(100, 190, 200, 110))); |
aura::Window* window3 = widget3->GetNativeWindow(); |
XID xid3 = window3->GetHost()->GetAcceleratedWidget(); |
@@ -277,7 +278,7 @@ TEST_F(X11TopmostWindowFinderTest, Basic) { |
// Test that the minimized state is properly handled. |
TEST_F(X11TopmostWindowFinderTest, Minimized) { |
- scoped_ptr<Widget> widget1( |
+ std::unique_ptr<Widget> widget1( |
CreateAndShowWidget(gfx::Rect(100, 100, 100, 100))); |
aura::Window* window1 = widget1->GetNativeWindow(); |
XID xid1 = window1->GetHost()->GetAcceleratedWidget(); |
@@ -316,7 +317,7 @@ TEST_F(X11TopmostWindowFinderTest, NonRectangular) { |
if (!ui::IsShapeExtensionAvailable()) |
return; |
- scoped_ptr<Widget> widget1( |
+ std::unique_ptr<Widget> widget1( |
CreateAndShowWidget(gfx::Rect(100, 100, 100, 100))); |
XID xid1 = widget1->GetNativeWindow()->GetHost()->GetAcceleratedWidget(); |
SkRegion* skregion1 = new SkRegion; |
@@ -356,7 +357,7 @@ TEST_F(X11TopmostWindowFinderTest, NonRectangularEmptyShape) { |
if (!ui::IsShapeExtensionAvailable()) |
return; |
- scoped_ptr<Widget> widget1( |
+ std::unique_ptr<Widget> widget1( |
CreateAndShowWidget(gfx::Rect(100, 100, 100, 100))); |
XID xid1 = widget1->GetNativeWindow()->GetHost()->GetAcceleratedWidget(); |
SkRegion* skregion1 = new SkRegion; |
@@ -377,7 +378,7 @@ TEST_F(X11TopmostWindowFinderTest, NonRectangularNullShape) { |
if (!ui::IsShapeExtensionAvailable()) |
return; |
- scoped_ptr<Widget> widget1( |
+ std::unique_ptr<Widget> widget1( |
CreateAndShowWidget(gfx::Rect(100, 100, 100, 100))); |
XID xid1 = widget1->GetNativeWindow()->GetHost()->GetAcceleratedWidget(); |
SkRegion* skregion1 = new SkRegion; |