diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-21 23:10:15 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2011-06-21 23:10:15 +0000 |
commit | 3eaa3a801feb0e1ae28a866ec5256c51b2daed6b (patch) | |
tree | c035cf72afd8cf53741b4c831f8ac882679ae6eb /views/view.h | |
parent | afbf65f026465e65136bb4de4d6b9946b4ec1c19 (diff) | |
download | chromium_src-3eaa3a801feb0e1ae28a866ec5256c51b2daed6b.zip chromium_src-3eaa3a801feb0e1ae28a866ec5256c51b2daed6b.tar.gz chromium_src-3eaa3a801feb0e1ae28a866ec5256c51b2daed6b.tar.bz2 |
views: Pull out DragController class into its own header file.
BUG=72040
TEST=None
R=ben@chromium.org
Review URL: http://codereview.chromium.org/7202015
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@89921 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.h')
-rw-r--r-- | views/view.h | 36 |
1 files changed, 5 insertions, 31 deletions
diff --git a/views/view.h b/views/view.h index f909ba4..8b32bb6 100644 --- a/views/view.h +++ b/views/view.h @@ -49,6 +49,7 @@ namespace views { class Background; class Border; +class DragController; class FocusManager; class FocusTraversable; class InputMethod; @@ -89,33 +90,6 @@ class ContextMenuController { virtual ~ContextMenuController() {} }; -// DragController is responsible for writing drag data for a view, as well as -// supplying the supported drag operations. Use DragController if you don't -// want to subclass. - -class DragController { - public: - // Writes the data for the drag. - virtual void WriteDragDataForView(View* sender, - const gfx::Point& press_pt, - OSExchangeData* data) = 0; - - // Returns the supported drag operations (see DragDropTypes for possible - // values). A drag is only started if this returns a non-zero value. - virtual int GetDragOperationsForView(View* sender, - const gfx::Point& p) = 0; - - // Returns true if a drag operation can be started. - // |press_pt| represents the coordinates where the mouse was initially - // pressed down. |p| is the current mouse coordinates. - virtual bool CanStartDragForView(View* sender, - const gfx::Point& press_pt, - const gfx::Point& p) = 0; - - protected: - virtual ~DragController() {} -}; - ///////////////////////////////////////////////////////////////////////////// // // View class @@ -791,10 +765,10 @@ class View : public AcceleratorTarget { // Drag and drop ------------------------------------------------------------- - // Set/get the DragController. See description of DragController for more - // information. - void SetDragController(DragController* drag_controller); - DragController* GetDragController(); + DragController* drag_controller() { return drag_controller_; } + void set_drag_controller(DragController* drag_controller) { + drag_controller_ = drag_controller; + } // During a drag and drop session when the mouse moves the view under the // mouse is queried for the drop types it supports by way of the |