Chromium Code Reviews| OLD | NEW |
|---|---|
| (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_ | |
| OLD | NEW |