Index: ui/app_list/views/apps_grid_view.h |
diff --git a/ui/app_list/views/apps_grid_view.h b/ui/app_list/views/apps_grid_view.h |
index b91ba64102f466812f226a987f9402af5c316179..1c2517aa4c62da5ef71a2d44d586d0ef2828e3fe 100644 |
--- a/ui/app_list/views/apps_grid_view.h |
+++ b/ui/app_list/views/apps_grid_view.h |
@@ -28,6 +28,7 @@ namespace test { |
class AppsGridViewTestApi; |
} |
+class ApplicationDnDHost; |
class AppListItemView; |
class AppsGridViewDelegate; |
class PageSwitcher; |
@@ -65,15 +66,18 @@ class APP_LIST_EXPORT AppsGridView : public views::View, |
// transition, this does nothing. |
void EnsureViewVisible(const views::View* view); |
- void InitiateDrag(views::View* view, |
+ void InitiateDrag(AppListItemView* view, |
Pointer pointer, |
const ui::LocatedEvent& event); |
- void UpdateDrag(views::View* view, |
+ void UpdateDrag(AppListItemView* view, |
Pointer pointer, |
const ui::LocatedEvent& event); |
void EndDrag(bool cancel); |
bool IsDraggedView(const views::View* view) const; |
+ // Set the drag and drop host for application links. |
+ void SetAppListDnDHost(ApplicationDnDHost* dnd_host); |
+ |
// Prerenders the icons on and around |page_index|. |
void Prerender(int page_index); |
@@ -157,6 +161,9 @@ class APP_LIST_EXPORT AppsGridView : public views::View, |
void CalculateDropTarget(const gfx::Point& drag_point, |
bool use_page_button_hovering); |
+ // Dispatch the drag and drop update event to the dnd host (if needed). |
+ void DispatchDragEventToDnDHost(const ui::LocatedEvent& event); |
+ |
// Starts the page flip timer if |drag_point| is in left/right side page flip |
// zone or is over page switcher. |
void MaybeStartPageFlipTimer(const gfx::Point& drag_point); |
@@ -202,11 +209,18 @@ class APP_LIST_EXPORT AppsGridView : public views::View, |
views::View* selected_view_; |
- views::View* drag_view_; |
+ AppListItemView* drag_view_; |
gfx::Point drag_start_; |
Pointer drag_pointer_; |
Index drop_target_; |
+ // An application target drag and drop host which accepts dnd operations. |
+ ApplicationDnDHost* dnd_host_; |
+ |
+ // The drag operation is currently inside the dnd host and events get |
+ // dispatched. |
+ bool dnd_host_dispatched_drag_; |
+ |
// Last mouse drag location in this view's coordinates. |
gfx::Point last_drag_point_; |