Avi Drissman | 3a215d1e | 2022-09-07 19:43:09 | [diff] [blame] | 1 | // Copyright 2012 The Chromium Authors |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 2 | // Use of this source code is governed by a BSD-style license that can be |
| 3 | // found in the LICENSE file. |
| 4 | |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 5 | #ifndef ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ |
| 6 | #define ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 7 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 8 | #include <memory> |
Arthur Sonzogni | a98e443 | 2023-11-28 18:15:01 | [diff] [blame] | 9 | #include <optional> |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 10 | |
[email protected] | b65bdda | 2011-12-23 23:35:31 | [diff] [blame] | 11 | #include "ash/ash_export.h" |
Jonah | 55ab85e8 | 2021-12-07 17:57:40 | [diff] [blame] | 12 | #include "ash/drag_drop/drag_drop_capture_delegate.h" |
Collin Baker | c6fae37 | 2020-05-01 23:37:47 | [diff] [blame] | 13 | #include "ash/drag_drop/tab_drag_drop_delegate.h" |
Avi Drissman | 4de6dab | 2023-01-06 23:17:35 | [diff] [blame] | 14 | #include "base/functional/callback.h" |
Arthur Sonzogni | 834e018f | 2023-04-22 10:20:02 | [diff] [blame] | 15 | #include "base/memory/raw_ptr.h" |
[email protected] | ffa4e448 | 2012-11-28 12:11:49 | [diff] [blame] | 16 | #include "base/memory/weak_ptr.h" |
Daichi Hirono | e66b415 | 2017-08-01 06:20:33 | [diff] [blame] | 17 | #include "base/observer_list.h" |
Evan Stade | 55a443f | 2017-07-20 19:41:02 | [diff] [blame] | 18 | #include "base/time/time.h" |
sky | 92d41b24 | 2016-10-27 20:10:16 | [diff] [blame] | 19 | #include "ui/aura/client/drag_drop_client.h" |
Aya ElAttar | 2e554e5 | 2021-01-11 13:03:43 | [diff] [blame] | 20 | #include "ui/aura/client/drag_drop_delegate.h" |
[email protected] | 341ad58 | 2012-02-03 18:31:09 | [diff] [blame] | 21 | #include "ui/aura/window_observer.h" |
Henrique Ferreiro | 1748fd1 | 2020-08-04 12:51:46 | [diff] [blame] | 22 | #include "ui/base/dragdrop/mojom/drag_drop_types.mojom-shared.h" |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 23 | #include "ui/base/dragdrop/os_exchange_data.h" |
Vincent Chiang | 6b90cd4d | 2024-06-18 18:25:20 | [diff] [blame] | 24 | #include "ui/display/manager/display_manager_observer.h" |
[email protected] | 86ccbd4 | 2013-09-18 18:11:54 | [diff] [blame] | 25 | #include "ui/events/event_constants.h" |
| 26 | #include "ui/events/event_handler.h" |
[email protected] | ffb15d1 | 2013-09-15 17:29:30 | [diff] [blame] | 27 | #include "ui/gfx/animation/animation_delegate.h" |
Avi Drissman | fefc2f8 | 2014-12-22 19:25:29 | [diff] [blame] | 28 | #include "ui/gfx/geometry/rect.h" |
Allen Bauer | 35d4e72 | 2020-06-16 22:47:56 | [diff] [blame] | 29 | #include "ui/views/widget/unique_widget_ptr.h" |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 30 | |
[email protected] | ffb15d1 | 2013-09-15 17:29:30 | [diff] [blame] | 31 | namespace gfx { |
[email protected] | 96fe25bf | 2012-11-27 20:30:25 | [diff] [blame] | 32 | class LinearAnimation; |
[email protected] | bb612db | 2012-01-09 17:31:13 | [diff] [blame] | 33 | } |
| 34 | |
sky | 4f4d259 | 2016-10-28 17:14:47 | [diff] [blame] | 35 | namespace ui { |
| 36 | class LocatedEvent; |
| 37 | } |
| 38 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 39 | namespace ash { |
Nick Diego Yamane | f258eb44 | 2020-10-28 04:57:16 | [diff] [blame] | 40 | class ToplevelWindowDragDelegate; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 41 | |
jamescook | b8dcef52 | 2016-06-25 14:42:55 | [diff] [blame] | 42 | class ASH_EXPORT DragDropController : public aura::client::DragDropClient, |
| 43 | public ui::EventHandler, |
| 44 | public gfx::AnimationDelegate, |
jamescook | 035dc06 | 2016-08-05 21:13:52 | [diff] [blame] | 45 | public aura::WindowObserver, |
Vincent Chiang | 6b90cd4d | 2024-06-18 18:25:20 | [diff] [blame] | 46 | public display::DisplayManagerObserver { |
[email protected] | 828a6dfa | 2012-05-10 20:03:02 | [diff] [blame] | 47 | public: |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 48 | DragDropController(); |
Peter Boström | ec31a04 | 2021-09-16 23:37:34 | [diff] [blame] | 49 | |
| 50 | DragDropController(const DragDropController&) = delete; |
| 51 | DragDropController& operator=(const DragDropController&) = delete; |
| 52 | |
dcheng | 34dfcbe | 2014-10-29 18:58:19 | [diff] [blame] | 53 | ~DragDropController() override; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 54 | |
James Cook | eb426b5 | 2018-09-17 16:45:12 | [diff] [blame] | 55 | void set_enabled(bool enabled) { enabled_ = enabled; } |
| 56 | |
Nick Diego Yamane | f258eb44 | 2020-10-28 04:57:16 | [diff] [blame] | 57 | void set_toplevel_window_drag_delegate(ToplevelWindowDragDelegate* delegate) { |
| 58 | toplevel_window_drag_delegate_ = delegate; |
| 59 | } |
| 60 | |
Mitsuru Oshima | 1feb6ad | 2023-02-15 04:10:01 | [diff] [blame] | 61 | // Returns if the drag drop operation has been fully completed. This is |
| 62 | // similar to IsDragDropInProgress, but returns true even after the drop_data |
| 63 | // is passed to the target, and keep returning true until the drag drop states |
| 64 | // are callbacks are called), so that the callback receive the proper |
| 65 | // state. |
| 66 | bool IsDragDropCompleted(); |
| 67 | |
[email protected] | 458b365c | 2011-12-15 05:04:09 | [diff] [blame] | 68 | // Overridden from aura::client::DragDropClient: |
Henrique Ferreiro | d7b970da | 2021-04-16 19:36:44 | [diff] [blame] | 69 | ui::mojom::DragOperation StartDragAndDrop( |
| 70 | std::unique_ptr<ui::OSExchangeData> data, |
| 71 | aura::Window* root_window, |
| 72 | aura::Window* source_window, |
| 73 | const gfx::Point& screen_location, |
| 74 | int allowed_operations, |
| 75 | ui::mojom::DragEventSource source) override; |
dcheng | 34dfcbe | 2014-10-29 18:58:19 | [diff] [blame] | 76 | void DragCancel() override; |
| 77 | bool IsDragDropInProgress() override; |
Daichi Hirono | e66b415 | 2017-08-01 06:20:33 | [diff] [blame] | 78 | void AddObserver(aura::client::DragDropClientObserver* observer) override; |
| 79 | void RemoveObserver(aura::client::DragDropClientObserver* observer) override; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 80 | |
[email protected] | 304594c | 2012-11-13 16:35:27 | [diff] [blame] | 81 | // Overridden from ui::EventHandler: |
dcheng | 34dfcbe | 2014-10-29 18:58:19 | [diff] [blame] | 82 | void OnKeyEvent(ui::KeyEvent* event) override; |
| 83 | void OnMouseEvent(ui::MouseEvent* event) override; |
| 84 | void OnTouchEvent(ui::TouchEvent* event) override; |
| 85 | void OnGestureEvent(ui::GestureEvent* event) override; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 86 | |
[email protected] | 341ad58 | 2012-02-03 18:31:09 | [diff] [blame] | 87 | // Overridden from aura::WindowObserver. |
Mitsuru Oshima | f47a938 | 2022-01-20 20:34:21 | [diff] [blame] | 88 | void OnWindowDestroying(aura::Window* window) override; |
[email protected] | 341ad58 | 2012-02-03 18:31:09 | [diff] [blame] | 89 | |
Fergus Dall | a429385 | 2019-07-26 07:13:47 | [diff] [blame] | 90 | void SetDragImage(const gfx::ImageSkia& image, |
| 91 | const gfx::Vector2d& image_offset); |
| 92 | |
Antonio Gomes | 6d6c753 | 2022-02-09 01:25:24 | [diff] [blame] | 93 | ui::mojom::DragEventSource event_source() { |
| 94 | return current_drag_event_source_; |
| 95 | } |
| 96 | |
Mitsuru Oshima | 0a71010 | 2022-01-11 21:15:56 | [diff] [blame] | 97 | // Sets the `closure` that will be executed as a replacement of |
| 98 | // inner event loop. A test can use this closure to generate events, or |
| 99 | // take other actions that should happen during the drag and drop, and |
| 100 | // can also check the condition that should be satisfied. |
| 101 | // The loop closure is called with a boolean value that indicates |
| 102 | // that this is called from the inner loop because the same closure will |
| 103 | // often used to generate the event that will eventually enter the drag |
| 104 | // and drop inner loop. The `quit_closure` is used for a test |
| 105 | // to exit the outer loop in the test. |
| 106 | using TestLoopClosure = base::RepeatingCallback<void()>; |
| 107 | void SetLoopClosureForTesting(TestLoopClosure closure, |
| 108 | base::OnceClosure quit_closure); |
| 109 | |
| 110 | void SetDisableNestedLoopForTesting(bool disable); |
| 111 | |
| 112 | // Deprecated: Use `SetDisableNestedLoopForTesting`. |
| 113 | void set_should_block_during_drag_drop(bool should_block_during_drag_drop) { |
| 114 | SetDisableNestedLoopForTesting(!should_block_during_drag_drop); |
| 115 | } |
| 116 | |
Mitsuru Oshima | b55be1a2 | 2024-01-17 21:25:40 | [diff] [blame] | 117 | void enable_no_image_touch_drag_for_test() { |
| 118 | allow_no_image_touch_drag_for_test_ = true; |
| 119 | } |
| 120 | |
[email protected] | ffa4e448 | 2012-11-28 12:11:49 | [diff] [blame] | 121 | protected: |
[email protected] | c0861045 | 2012-11-28 21:48:36 | [diff] [blame] | 122 | // Helper method to create a LinearAnimation object that will run the drag |
| 123 | // cancel animation. Caller take ownership of the returned object. Protected |
| 124 | // for testing. |
[email protected] | ffb15d1 | 2013-09-15 17:29:30 | [diff] [blame] | 125 | virtual gfx::LinearAnimation* CreateCancelAnimation( |
Evan Stade | 55a443f | 2017-07-20 19:41:02 | [diff] [blame] | 126 | base::TimeDelta duration, |
[email protected] | c0861045 | 2012-11-28 21:48:36 | [diff] [blame] | 127 | int frame_rate, |
[email protected] | ffb15d1 | 2013-09-15 17:29:30 | [diff] [blame] | 128 | gfx::AnimationDelegate* delegate); |
[email protected] | c0861045 | 2012-11-28 21:48:36 | [diff] [blame] | 129 | |
sky | 4f4d259 | 2016-10-28 17:14:47 | [diff] [blame] | 130 | // Exposed for tests to override. |
| 131 | virtual void DragUpdate(aura::Window* target, const ui::LocatedEvent& event); |
| 132 | virtual void Drop(aura::Window* target, const ui::LocatedEvent& event); |
| 133 | |
[email protected] | ffa4e448 | 2012-11-28 12:11:49 | [diff] [blame] | 134 | // Actual implementation of |DragCancel()|. protected for testing. |
Evan Stade | 55a443f | 2017-07-20 19:41:02 | [diff] [blame] | 135 | virtual void DoDragCancel(base::TimeDelta drag_cancel_animation_duration); |
[email protected] | ffa4e448 | 2012-11-28 12:11:49 | [diff] [blame] | 136 | |
Jonah | 55ab85e8 | 2021-12-07 17:57:40 | [diff] [blame] | 137 | // Exposed for test assertions. |
| 138 | DragDropCaptureDelegate* get_capture_delegate() { return capture_delegate_; } |
| 139 | |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 140 | private: |
James Cook | 317781a | 2017-07-18 02:08:06 | [diff] [blame] | 141 | friend class DragDropControllerTest; |
James Cook | eb426b5 | 2018-09-17 16:45:12 | [diff] [blame] | 142 | friend class DragDropControllerTestApi; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 143 | |
[email protected] | ffb15d1 | 2013-09-15 17:29:30 | [diff] [blame] | 144 | // Overridden from gfx::AnimationDelegate: |
dcheng | 34dfcbe | 2014-10-29 18:58:19 | [diff] [blame] | 145 | void AnimationEnded(const gfx::Animation* animation) override; |
| 146 | void AnimationProgressed(const gfx::Animation* animation) override; |
| 147 | void AnimationCanceled(const gfx::Animation* animation) override; |
[email protected] | bb612db | 2012-01-09 17:31:13 | [diff] [blame] | 148 | |
Vincent Chiang | 6b90cd4d | 2024-06-18 18:25:20 | [diff] [blame] | 149 | // display::DisplayManagerObserver |
| 150 | void OnWillApplyDisplayChanges() override; |
jamescook | 035dc06 | 2016-08-05 21:13:52 | [diff] [blame] | 151 | |
[email protected] | bb612db | 2012-01-09 17:31:13 | [diff] [blame] | 152 | // Helper method to start drag widget flying back animation. |
Evan Stade | 55a443f | 2017-07-20 19:41:02 | [diff] [blame] | 153 | void StartCanceledAnimation(base::TimeDelta animation_duration); |
[email protected] | ffa4e448 | 2012-11-28 12:11:49 | [diff] [blame] | 154 | |
Yuzhu Shen | e905e11a | 2022-08-16 22:34:53 | [diff] [blame] | 155 | // Helper methods to forward |pending_log_tap_| event to |
| 156 | // |drag_source_window_|. |
| 157 | void ScheduleForwardPendingLongTap(); |
[email protected] | ffa4e448 | 2012-11-28 12:11:49 | [diff] [blame] | 158 | void ForwardPendingLongTap(); |
[email protected] | bb612db | 2012-01-09 17:31:13 | [diff] [blame] | 159 | |
Yuzhu Shen | e905e11a | 2022-08-16 22:34:53 | [diff] [blame] | 160 | // Helper method to reset most of the state, except state that could be used |
| 161 | // during async operations of cancellation (including cancel animation and |
| 162 | // posting task to dispatch long tap event). |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 163 | void Cleanup(); |
| 164 | |
Yuzhu Shen | e905e11a | 2022-08-16 22:34:53 | [diff] [blame] | 165 | void CleanupPendingLongTap(); |
| 166 | |
andrewxu | 75470039 | 2023-02-26 19:03:22 | [diff] [blame] | 167 | // Performs data drop. NOTE: this method does not run in an async drop if |
| 168 | // disallowed by `ui::DataTransferPolicyController`. `cancel_drag_callback` |
| 169 | // runs if this method does not run. |
Aya ElAttar | fd5ce86f | 2021-09-23 18:20:00 | [diff] [blame] | 170 | void PerformDrop(const gfx::Point drop_location_in_screen, |
| 171 | ui::DropTargetEvent event, |
| 172 | std::unique_ptr<ui::OSExchangeData> drag_data, |
| 173 | aura::client::DragDropDelegate::DropCallback drop_cb, |
| 174 | std::unique_ptr<TabDragDropDelegate> tab_drag_drop_delegate, |
andrewxu | 75470039 | 2023-02-26 19:03:22 | [diff] [blame] | 175 | base::ScopedClosureRunner cancel_drag_callback); |
Aya ElAttar | fd5ce86f | 2021-09-23 18:20:00 | [diff] [blame] | 176 | |
Jonah | 4b60989 | 2021-11-09 22:51:07 | [diff] [blame] | 177 | void CancelIfInProgress(); |
| 178 | |
James Cook | eb426b5 | 2018-09-17 16:45:12 | [diff] [blame] | 179 | bool enabled_ = false; |
Mitsuru Oshima | 1feb6ad | 2023-02-15 04:10:01 | [diff] [blame] | 180 | bool drag_drop_completed_ = true; |
Ana Salazar | 40d497c | 2023-02-23 22:47:07 | [diff] [blame] | 181 | std::unique_ptr<views::Widget> drag_image_widget_; |
[email protected] | ceb36f7d | 2012-10-31 18:33:24 | [diff] [blame] | 182 | gfx::Vector2d drag_image_offset_; |
Navid Zolghadr | 0beb829 | 2019-07-08 18:54:04 | [diff] [blame] | 183 | std::unique_ptr<ui::OSExchangeData> drag_data_; |
Henrique Ferreiro | d7b970da | 2021-04-16 19:36:44 | [diff] [blame] | 184 | int allowed_operations_ = 0; |
| 185 | ui::mojom::DragOperation operation_ = ui::mojom::DragOperation::kNone; |
Aya ElAttar | 2e554e5 | 2021-01-11 13:03:43 | [diff] [blame] | 186 | aura::client::DragUpdateInfo current_drag_info_; |
[email protected] | 6a5fc42 | 2012-03-06 04:43:26 | [diff] [blame] | 187 | |
Collin Baker | c6fae37 | 2020-05-01 23:37:47 | [diff] [blame] | 188 | // Used when processing a Chrome tab drag from a WebUI tab strip. |
Aya ElAttar | fd5ce86f | 2021-09-23 18:20:00 | [diff] [blame] | 189 | std::unique_ptr<TabDragDropDelegate> tab_drag_drop_delegate_; |
Collin Baker | 7f9a165 | 2020-04-28 20:18:16 | [diff] [blame] | 190 | |
Mitsuru Oshima | 03d96e5f | 2022-04-14 21:32:54 | [diff] [blame] | 191 | // Used when processing a normal drag and drop with touch. |
| 192 | std::unique_ptr<DragDropCaptureDelegate> touch_drag_drop_delegate_; |
| 193 | |
[email protected] | 6a5fc42 | 2012-03-06 04:43:26 | [diff] [blame] | 194 | // Window that is currently under the drag cursor. |
Bartek Nowierski | deb7584 | 2023-12-27 02:32:42 | [diff] [blame] | 195 | raw_ptr<aura::Window> drag_window_ = nullptr; |
[email protected] | ffa4e448 | 2012-11-28 12:11:49 | [diff] [blame] | 196 | |
| 197 | // Starting and final bounds for the drag image for the drag cancel animation. |
| 198 | gfx::Rect drag_image_initial_bounds_for_cancel_animation_; |
| 199 | gfx::Rect drag_image_final_bounds_for_cancel_animation_; |
[email protected] | 96fe25bf | 2012-11-27 20:30:25 | [diff] [blame] | 200 | |
dcheng | a9454747 | 2016-04-08 08:41:11 | [diff] [blame] | 201 | std::unique_ptr<gfx::LinearAnimation> cancel_animation_; |
sangwoo | 843c6cda | 2019-12-06 00:15:51 | [diff] [blame] | 202 | std::unique_ptr<gfx::AnimationDelegate> cancel_animation_notifier_; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 203 | |
[email protected] | ffa4e448 | 2012-11-28 12:11:49 | [diff] [blame] | 204 | // Window that started the drag. |
Bartek Nowierski | deb7584 | 2023-12-27 02:32:42 | [diff] [blame] | 205 | raw_ptr<aura::Window> drag_source_window_ = nullptr; |
[email protected] | ffa4e448 | 2012-11-28 12:11:49 | [diff] [blame] | 206 | |
Mitsuru Oshima | 0a71010 | 2022-01-11 21:15:56 | [diff] [blame] | 207 | // A closure that allows a test to implement the actions within |
| 208 | // drag and drop event loop. |
| 209 | TestLoopClosure test_loop_closure_; |
| 210 | |
| 211 | // True if the nested event loop is disabled. |
| 212 | bool nested_loop_disabled_for_testing_ = false; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 213 | |
gab | 2998ee7 | 2017-05-05 16:23:50 | [diff] [blame] | 214 | // Closure for quitting nested run loop. |
Reilly Grant | b670223 | 2019-11-26 22:46:04 | [diff] [blame] | 215 | base::OnceClosure quit_closure_; |
[email protected] | 8e937c1e | 2012-06-28 22:57:30 | [diff] [blame] | 216 | |
Jonah | 55ab85e8 | 2021-12-07 17:57:40 | [diff] [blame] | 217 | // If non-null, a drag is active which required a capture window. |
Bartek Nowierski | deb7584 | 2023-12-27 02:32:42 | [diff] [blame] | 218 | raw_ptr<DragDropCaptureDelegate, DanglingUntriaged> capture_delegate_ = |
| 219 | nullptr; |
Jun Mukai | 14fc300 | 2021-06-22 17:45:38 | [diff] [blame] | 220 | |
Henrique Ferreiro | 1748fd1 | 2020-08-04 12:51:46 | [diff] [blame] | 221 | ui::mojom::DragEventSource current_drag_event_source_ = |
| 222 | ui::mojom::DragEventSource::kMouse; |
[email protected] | ffa4e448 | 2012-11-28 12:11:49 | [diff] [blame] | 223 | |
| 224 | // Holds a synthetic long tap event to be sent to the |drag_source_window_|. |
| 225 | // See comment in OnGestureEvent() on why we need this. |
Jonah | 4b60989 | 2021-11-09 22:51:07 | [diff] [blame] | 226 | std::unique_ptr<ui::Event> pending_long_tap_; |
Yuzhu Shen | e905e11a | 2022-08-16 22:34:53 | [diff] [blame] | 227 | // Set to true during async operations of cancellation (including cancel |
| 228 | // animation and posting task to dispatch long tap event), indicating that a |
| 229 | // long tap event will be dispatched. |
| 230 | bool will_forward_long_tap_ = false; |
[email protected] | ffa4e448 | 2012-11-28 12:11:49 | [diff] [blame] | 231 | |
Fergus Dall | a429385 | 2019-07-26 07:13:47 | [diff] [blame] | 232 | gfx::Point start_location_; |
| 233 | gfx::Point current_location_; |
| 234 | |
mikt | bacc1fc | 2024-03-07 16:38:20 | [diff] [blame] | 235 | base::ObserverList<aura::client::DragDropClientObserver>:: |
| 236 | UncheckedAndDanglingUntriaged observers_; |
Daichi Hirono | e66b415 | 2017-08-01 06:20:33 | [diff] [blame] | 237 | |
Bartek Nowierski | deb7584 | 2023-12-27 02:32:42 | [diff] [blame] | 238 | raw_ptr<ToplevelWindowDragDelegate, DanglingUntriaged> |
Arthur Sonzogni | 834e018f | 2023-04-22 10:20:02 | [diff] [blame] | 239 | toplevel_window_drag_delegate_ = nullptr; |
Nick Diego Yamane | f258eb44 | 2020-10-28 04:57:16 | [diff] [blame] | 240 | |
Mitsuru Oshima | b55be1a2 | 2024-01-17 21:25:40 | [diff] [blame] | 241 | bool allow_no_image_touch_drag_for_test_ = false; |
| 242 | |
Yuzhu Shen | e905e11a | 2022-08-16 22:34:53 | [diff] [blame] | 243 | // Weak ptr for async callbacks to be invalidated if a new drag starts. |
Jeremy Roman | 47d432e | 2019-08-20 14:24:00 | [diff] [blame] | 244 | base::WeakPtrFactory<DragDropController> weak_factory_{this}; |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 245 | }; |
| 246 | |
[email protected] | 55f59335 | 2011-12-24 05:42:46 | [diff] [blame] | 247 | } // namespace ash |
[email protected] | 084b6bb | 2011-11-17 05:18:16 | [diff] [blame] | 248 | |
[email protected] | 2f74428 | 2011-12-23 22:40:52 | [diff] [blame] | 249 | #endif // ASH_DRAG_DROP_DRAG_DROP_CONTROLLER_H_ |