OLD | NEW |
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 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 SERVICES_UI_WS_DRAG_CONTROLLER_H_ | 5 #ifndef SERVICES_UI_WS_DRAG_CONTROLLER_H_ |
6 #define SERVICES_UI_WS_DRAG_CONTROLLER_H_ | 6 #define SERVICES_UI_WS_DRAG_CONTROLLER_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 | 10 |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
104 void DispatchOperation(ServerWindow* window, WindowState* state); | 104 void DispatchOperation(ServerWindow* window, WindowState* state); |
105 void OnRespondToOperation(ServerWindow* window); | 105 void OnRespondToOperation(ServerWindow* window); |
106 | 106 |
107 // Callback methods. | 107 // Callback methods. |
108 void OnDragStatusCompleted(const WindowId& id, DropEffectBitmask bitmask); | 108 void OnDragStatusCompleted(const WindowId& id, DropEffectBitmask bitmask); |
109 void OnDragDropCompleted(const WindowId& id, DropEffect action); | 109 void OnDragDropCompleted(const WindowId& id, DropEffect action); |
110 | 110 |
111 // ServerWindowObserver: | 111 // ServerWindowObserver: |
112 void OnWindowDestroying(ServerWindow* window) override; | 112 void OnWindowDestroying(ServerWindow* window) override; |
113 | 113 |
| 114 static std::string ToString(OperationType type); |
| 115 |
114 // Our owner. | 116 // Our owner. |
115 DragSource* source_; | 117 DragSource* source_; |
116 | 118 |
117 // Object to notify about all cursor changes. | 119 // Object to notify about all cursor changes. |
118 DragCursorUpdater* cursor_updater_; | 120 DragCursorUpdater* cursor_updater_; |
119 | 121 |
120 // A bit-field of acceptable drag operations offered by the source. | 122 // A bit-field of acceptable drag operations offered by the source. |
121 const DropEffectBitmask drag_operations_; | 123 const DropEffectBitmask drag_operations_; |
122 | 124 |
123 // Only act on pointer events that meet this id. | 125 // Only act on pointer events that meet this id. |
(...skipping 27 matching lines...) Expand all Loading... |
151 | 153 |
152 base::WeakPtrFactory<DragController> weak_factory_; | 154 base::WeakPtrFactory<DragController> weak_factory_; |
153 | 155 |
154 DISALLOW_COPY_AND_ASSIGN(DragController); | 156 DISALLOW_COPY_AND_ASSIGN(DragController); |
155 }; | 157 }; |
156 | 158 |
157 } // namespace ws | 159 } // namespace ws |
158 } // namespace ui | 160 } // namespace ui |
159 | 161 |
160 #endif // SERVICES_UI_WS_DRAG_CONTROLLER_H_ | 162 #endif // SERVICES_UI_WS_DRAG_CONTROLLER_H_ |
OLD | NEW |