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

Side by Side Diff: ui/views/widget/desktop_aura/desktop_drag_drop_client_aurax11.h

Issue 800183005: Adding UMA stats for dragdrop events for both touch and mouse. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: All errors removed, Adding UMA stats to track usage of DragAndDrop on ChromeOS, X11, and Windows. A… Created 5 years, 11 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_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ 5 #ifndef UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_
6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ 6 #define UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_
7 7
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9
9 #include <set> 10 #include <set>
11 #include <utility>
mfomitchev 2015/01/13 17:01:25 Doesn't seem like this should be needed.
caelyn 2015/01/13 23:48:58 Added because lint suggested it, removing it and a
10 #include <vector> 12 #include <vector>
11 13
12 #include "base/compiler_specific.h" 14 #include "base/compiler_specific.h"
13 #include "base/memory/scoped_ptr.h" 15 #include "base/memory/scoped_ptr.h"
14 #include "base/memory/weak_ptr.h" 16 #include "base/memory/weak_ptr.h"
15 #include "base/timer/timer.h" 17 #include "base/timer/timer.h"
16 #include "ui/aura/window_observer.h" 18 #include "ui/aura/window_observer.h"
17 #include "ui/base/cursor/cursor.h" 19 #include "ui/base/cursor/cursor.h"
18 #include "ui/base/dragdrop/drag_drop_types.h" 20 #include "ui/base/dragdrop/drag_drop_types.h"
19 #include "ui/gfx/geometry/point.h" 21 #include "ui/gfx/geometry/point.h"
(...skipping 235 matching lines...) Expand 10 before | Expand all | Expand 10 after
255 SourceState source_state_; 257 SourceState source_state_;
256 258
257 // The current drag-drop client that has an active operation. Since we have 259 // The current drag-drop client that has an active operation. Since we have
258 // multiple root windows and multiple DesktopDragDropClientAuraX11 instances 260 // multiple root windows and multiple DesktopDragDropClientAuraX11 instances
259 // it is important to maintain only one drag and drop operation at any time. 261 // it is important to maintain only one drag and drop operation at any time.
260 static DesktopDragDropClientAuraX11* g_current_drag_drop_client; 262 static DesktopDragDropClientAuraX11* g_current_drag_drop_client;
261 263
262 // The operation bitfield as requested by StartDragAndDrop. 264 // The operation bitfield as requested by StartDragAndDrop.
263 int drag_operation_; 265 int drag_operation_;
264 266
267 // The DragEventSource as reported by StartDragAndDrop.
268 ui::DragDropTypes::DragEventSource current_drag_event_source_;
269
265 // We offer the other window a list of possible operations, 270 // We offer the other window a list of possible operations,
266 // XdndActionsList. This is the requested action from the other window. This 271 // XdndActionsList. This is the requested action from the other window. This
267 // is DRAG_NONE if we haven't sent out an XdndPosition message yet, haven't 272 // is DRAG_NONE if we haven't sent out an XdndPosition message yet, haven't
268 // yet received an XdndStatus or if the other window has told us that there's 273 // yet received an XdndStatus or if the other window has told us that there's
269 // no action that we can agree on. 274 // no action that we can agree on.
270 ui::DragDropTypes::DragOperation negotiated_operation_; 275 ui::DragDropTypes::DragOperation negotiated_operation_;
271 276
272 // Ends the move loop if the target is too slow to respond after the mouse is 277 // Ends the move loop if the target is too slow to respond after the mouse is
273 // released. 278 // released.
274 base::OneShotTimer<DesktopDragDropClientAuraX11> end_move_loop_timer_; 279 base::OneShotTimer<DesktopDragDropClientAuraX11> end_move_loop_timer_;
275 280
276 // Widget that the user drags around. May be NULL. 281 // Widget that the user drags around. May be NULL.
277 scoped_ptr<Widget> drag_widget_; 282 scoped_ptr<Widget> drag_widget_;
278 283
279 // The offset of |drag_widget_| relative to the mouse position. 284 // The offset of |drag_widget_| relative to the mouse position.
280 gfx::Vector2d drag_widget_offset_; 285 gfx::Vector2d drag_widget_offset_;
281 286
282 base::WeakPtrFactory<DesktopDragDropClientAuraX11> weak_ptr_factory_; 287 base::WeakPtrFactory<DesktopDragDropClientAuraX11> weak_ptr_factory_;
283 288
284 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientAuraX11); 289 DISALLOW_COPY_AND_ASSIGN(DesktopDragDropClientAuraX11);
285 }; 290 };
286 291
287 } // namespace views 292 } // namespace views
288 293
289 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_ 294 #endif // UI_VIEWS_WIDGET_DESKTOP_AURA_DESKTOP_DRAG_DROP_CLIENT_AURAX11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698