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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_drop_target_win.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 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 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTIOP_DROP_TARGET_WIN_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTIOP_DROP_TARGET_WIN_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTIOP_DROP_TARGET_WIN_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTIOP_DROP_TARGET_WIN_H_
7 7
8 #include <memory>
9
8 #include "base/macros.h" 10 #include "base/macros.h"
9 #include "base/memory/scoped_ptr.h"
10 #include "ui/aura/window_observer.h" 11 #include "ui/aura/window_observer.h"
11 #include "ui/base/dragdrop/drop_target_win.h" 12 #include "ui/base/dragdrop/drop_target_win.h"
12 13
13 namespace aura { 14 namespace aura {
14 namespace client { 15 namespace client {
15 class DragDropDelegate; 16 class DragDropDelegate;
16 } 17 }
17 } 18 }
18 19
19 namespace ui { 20 namespace ui {
(...skipping 30 matching lines...) Expand all
50 51
51 // aura::WindowObserver implementation: 52 // aura::WindowObserver implementation:
52 void OnWindowDestroyed(aura::Window* window) override; 53 void OnWindowDestroyed(aura::Window* window) override;
53 54
54 // Common functionality for the ui::DropTargetWin methods to translate from 55 // Common functionality for the ui::DropTargetWin methods to translate from
55 // COM data types to Aura ones. 56 // COM data types to Aura ones.
56 void Translate(IDataObject* data_object, 57 void Translate(IDataObject* data_object,
57 DWORD key_state, 58 DWORD key_state,
58 POINT cursor_position, 59 POINT cursor_position,
59 DWORD effect, 60 DWORD effect,
60 scoped_ptr<ui::OSExchangeData>* data, 61 std::unique_ptr<ui::OSExchangeData>* data,
61 scoped_ptr<ui::DropTargetEvent>* event, 62 std::unique_ptr<ui::DropTargetEvent>* event,
62 aura::client::DragDropDelegate** delegate); 63 aura::client::DragDropDelegate** delegate);
63 64
64 void NotifyDragLeave(); 65 void NotifyDragLeave();
65 66
66 // The root window associated with this drop target. 67 // The root window associated with this drop target.
67 aura::Window* root_window_; 68 aura::Window* root_window_;
68 69
69 // The Aura window that is currently under the cursor. We need to manually 70 // The Aura window that is currently under the cursor. We need to manually
70 // keep track of this because Windows will only call our drag enter method 71 // keep track of this because Windows will only call our drag enter method
71 // once when the user enters the associated HWND. But inside that HWND there 72 // once when the user enters the associated HWND. But inside that HWND there
72 // could be multiple aura windows, so we need to generate drag enter events 73 // could be multiple aura windows, so we need to generate drag enter events
73 // for them. 74 // for them.
74 aura::Window* target_window_; 75 aura::Window* target_window_;
75 76
76 DISALLOW_COPY_AND_ASSIGN(DesktopDropTargetWin); 77 DISALLOW_COPY_AND_ASSIGN(DesktopDropTargetWin);
77 }; 78 };
78 79
79 } // namespace views 80 } // namespace views
80 81
81 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTIOP_DROP_TARGET_WIN_H_ 82 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTIOP_DROP_TARGET_WIN_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698