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

Side by Side Diff: ui/views/events/drag_controller.h

Issue 6286013: V2 (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 9 years, 10 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 | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef UI_VIEWS_DRAG_CONTROLLER_H_
sky 2011/02/01 18:56:22 VIEWS_EVENTS
6 #define UI_VIEWS_DRAG_CONTROLLER_H_
7 #pragma once
8
9 namespace ui {
10
11 // DragController is responsible for writing drag data for a View, as well as
12 // supplying the supported drag operations without having to subclass View.
13 class DragController {
14 public:
15 // Writes the data for the drag.
16 virtual void WriteDragData(View* sender,
17 const gfx::Point& press_pt,
18 OSExchangeData* data) = 0;
19
20 // Returns the supported drag operations (see DragDropTypes for possible
21 // values). A drag is only started if this returns a non-zero value.
22 virtual int GetDragOperations(View* sender, const gfx::Point& p) = 0;
23
24 // Returns true if a drag operation can be started.
25 // |press_pt| represents the coordinates where the mouse was initially
26 // pressed down. |p| is the current mouse coordinates.
27 virtual bool CanStartDrag(View* sender,
28 const gfx::Point& press_pt,
29 const gfx::Point& p) = 0;
30
31 protected:
32 virtual ~DragController() {}
33 };
34
35 } // namespace ui
36
37 #endif // UI_VIEWS_DRAG_CONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698