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

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

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.cc
diff --git a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
index e9907e2a2759c6979a3612b764cccdf38cdbae79..d39aaf2945a1878fb8ff683c42325e1d378b6089 100644
--- a/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
+++ b/ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.cc
@@ -4,13 +4,14 @@
#include "ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h"
+#include <X11/Xatom.h>
#include <stddef.h>
#include <stdint.h>
-#include <X11/Xatom.h>
#include "base/event_types.h"
#include "base/lazy_instance.h"
#include "base/macros.h"
+#include "base/memory/ptr_util.h"
#include "base/message_loop/message_loop.h"
#include "base/metrics/histogram_macros.h"
#include "third_party/skia/include/core/SkBitmap.h"
@@ -838,9 +839,9 @@ void DesktopDragDropClientAuraX11::OnMoveLoopEnded() {
end_move_loop_timer_.Stop();
}
-scoped_ptr<X11MoveLoop> DesktopDragDropClientAuraX11::CreateMoveLoop(
+std::unique_ptr<X11MoveLoop> DesktopDragDropClientAuraX11::CreateMoveLoop(
X11MoveLoopDelegate* delegate) {
- return make_scoped_ptr(new X11WholeScreenMoveLoop(this));
+ return base::WrapUnique(new X11WholeScreenMoveLoop(this));
}
XID DesktopDragDropClientAuraX11::FindWindowFor(
@@ -952,8 +953,8 @@ void DesktopDragDropClientAuraX11::EndMoveLoop() {
void DesktopDragDropClientAuraX11::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) {
gfx::Point root_location = root_window_location;
root_window_->GetHost()->ConvertPointFromNativeScreen(&root_location);
@@ -1065,8 +1066,8 @@ void DesktopDragDropClientAuraX11::CompleteXdndPosition(
::Window source_window,
const gfx::Point& screen_point) {
int drag_operation = ui::DragDropTypes::DRAG_NONE;
- scoped_ptr<ui::OSExchangeData> data;
- scoped_ptr<ui::DropTargetEvent> drop_target_event;
+ std::unique_ptr<ui::OSExchangeData> data;
+ std::unique_ptr<ui::DropTargetEvent> drop_target_event;
DragDropDelegate* delegate = NULL;
DragTranslate(screen_point, &data, &drop_target_event, &delegate);
if (delegate)

Powered by Google App Engine
This is Rietveld 408576698