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

Side by Side Diff: ui/app_list/views/app_list_dnd_host.h

Issue 14533006: Drag and drop between app list and launcher - First patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 7 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) 2012 The Chromium Authors. All rights reserved.
James Cook 2013/04/29 22:08:29 "Copyright 2013" without (c)
Mr4D (OOO till 08-26) 2013/04/30 16:59:01 Done.
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_APP_LIST_VIEWS_APP_LIST_DND_HOST_H_
6 #define UI_APP_LIST_VIEWS_APP_LIST_DND_HOST_H_
7
8 #include <string>
9
10 #include "ui/gfx/point.h"
11
12 namespace app_list {
13
14 // This class will get used by the AppListView to drag and drop Application
15 // shortcuts onto another host (the launcher).
16 class ApplicationDnDHost {
James Cook 2013/04/29 22:08:29 DnD -> DragAndDrop, or just Drag, or just Drop. N
Mr4D (OOO till 08-26) 2013/04/30 16:59:01 Done.
17 public:
18 // A drag operation could get started. The recipient has to return true if
19 // he wants to take it - e.g. |location_in_screen_poordinates| is over a
20 // target area. The passed |app_id| identifies the application which should
21 // get dropped.
22 virtual bool StartDrag(const std::string& app_id,
23 const gfx::Point& location_in_screen_coordinates) = 0;
24
25 // This gets only called when the |StartDrag| function returned true and it
26 // dispatches the mouse coordinate change accordingly. When the function
27 // returns false it requests that the operation gets aborted since the event
James Cook 2013/04/29 22:08:29 nit: gets aborted -> be aborted
Mr4D (OOO till 08-26) 2013/04/30 16:59:01 Done.
28 // location is out of bounds.
29 virtual bool Drag(const gfx::Point& location_in_screen_coordinates) = 0;
30
31 // Once |StartDrag| returned true, this function is guaranteed to be called
32 // when the mouse / touch events stop. If |cancel| is set, the drag operation
33 // was aborted, otherwise the change should be kept.
34 virtual void EndDrag(bool cancel) = 0;
35 };
36
37 } // namespace app_list
38
39 #endif // UI_APP_LIST_VIEWS_APP_LIST_DND_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698