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

Side by Side Diff: views/drag_controller.h

Issue 8735009: views: Move some random files from views/ to ui/views/. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years 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
« no previous file with comments | « views/debug_utils.cc ('k') | views/drag_utils.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 VIEWS_EVENTS_DRAG_CONTROLLER_H_
6 #define VIEWS_EVENTS_DRAG_CONTROLLER_H_
7 #pragma once
8
9 #include "views/views_export.h"
10
11 namespace gfx {
12 class Point;
13 }
14
15 namespace ui {
16 class OSExchangeData;
17 }
18
19 namespace views {
20 class View;
21
22 // DragController is responsible for writing drag data for a view, as well as
23 // supplying the supported drag operations. Use DragController if you don't
24 // want to subclass.
25 class VIEWS_EXPORT DragController {
26 public:
27 // Writes the data for the drag.
28 virtual void WriteDragDataForView(View* sender,
29 const gfx::Point& press_pt,
30 OSExchangeData* data) = 0;
31
32 // Returns the supported drag operations (see DragDropTypes for possible
33 // values). A drag is only started if this returns a non-zero value.
34 virtual int GetDragOperationsForView(View* sender,
35 const gfx::Point& p) = 0;
36
37 // Returns true if a drag operation can be started.
38 // |press_pt| represents the coordinates where the mouse was initially
39 // pressed down. |p| is the current mouse coordinates.
40 virtual bool CanStartDragForView(View* sender,
41 const gfx::Point& press_pt,
42 const gfx::Point& p) = 0;
43
44 protected:
45 virtual ~DragController() {}
46 };
47
48 } // namespace views
49
50 #endif // VIEWS_EVENTS_DRAG_CONTROLLER_H_
OLDNEW
« no previous file with comments | « views/debug_utils.cc ('k') | views/drag_utils.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698