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

Unified Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h

Issue 1868363002: Replace scoped_ptr with std::unique_ptr in //ui (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@scopedptrcc
Patch Set: scopedptrui: rebase-make_scoped_ptr 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: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h
index 65dc403ddf2294720ad3997dd721c353c3e792b8..9fec7bbe020b2d6ea9029ed17780b88369fabed5 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h
@@ -6,12 +6,13 @@
#define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_
#include <X11/Xlib.h>
+
+#include <memory>
#include <set>
#include <vector>
#include "base/compiler_specific.h"
#include "base/macros.h"
-#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/timer/timer.h"
#include "ui/aura/window_observer.h"
@@ -106,7 +107,7 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
// The following methods are virtual for the sake of testing.
// Creates a move loop.
- virtual scoped_ptr<X11MoveLoop> CreateMoveLoop(
+ virtual std::unique_ptr<X11MoveLoop> CreateMoveLoop(
X11MoveLoopDelegate* delegate);
// Finds the topmost X11 window at |screen_point| and returns it if it is
@@ -148,8 +149,8 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
// the underlying aura::Window representation, as moves internal to the X11
// window can cause internal drag leave and enter messages.
void DragTranslate(const gfx::Point& root_window_location,
- scoped_ptr<ui::OSExchangeData>* data,
- scoped_ptr<ui::DropTargetEvent>* event,
+ std::unique_ptr<ui::OSExchangeData>* data,
+ std::unique_ptr<ui::DropTargetEvent>* event,
aura::client::DragDropDelegate** delegate);
// Called when we need to notify the current aura::Window that we're no
@@ -201,7 +202,7 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
// A nested message loop that notifies this object of events through the
// X11MoveLoopDelegate interface.
- scoped_ptr<X11MoveLoop> move_loop_;
+ std::unique_ptr<X11MoveLoop> move_loop_;
aura::Window* root_window_;
@@ -214,7 +215,7 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
// Target side information.
class X11DragContext;
- scoped_ptr<X11DragContext> target_current_context_;
+ std::unique_ptr<X11DragContext> target_current_context_;
// The modifier state for the most recent mouse move.
int current_modifier_state_;
@@ -238,7 +239,7 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
// If we would send an XdndPosition message while we're waiting for an
// XdndStatus response, we need to cache the latest details we'd send.
- scoped_ptr<std::pair<gfx::Point, unsigned long> > next_position_message_;
+ std::unique_ptr<std::pair<gfx::Point, unsigned long>> next_position_message_;
// Reprocesses the most recent mouse move event if the mouse has not moved
// in a while in case the window stacking order has changed and
@@ -275,7 +276,7 @@ class VIEWS_EXPORT DesktopDragDropClientAuraX11
base::OneShotTimer end_move_loop_timer_;
// Widget that the user drags around. May be NULL.
- scoped_ptr<Widget> drag_widget_;
+ std::unique_ptr<Widget> drag_widget_;
// The offset of |drag_widget_| relative to the mouse position.
gfx::Vector2d drag_widget_offset_;

Powered by Google App Engine
This is Rietveld 408576698