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

Unified Diff: ui/app_list/views/apps_grid_view.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: Merged & addressed 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 side-by-side diff with in-line comments
Download patch
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..1406a549eba699eb4b0e970230c4d05262235151 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 ApplicationDragAndDropHost;
class AppListItemView;
class AppsGridViewDelegate;
class PageSwitcher;
@@ -65,15 +66,19 @@ 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 SetDragAndDropHostOfCurrentAppList(
+ ApplicationDragAndDropHost* drag_and_drop_host);
+
// Prerenders the icons on and around |page_index|.
void Prerender(int page_index);
@@ -157,6 +162,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 DispatchDragEventToDragAndDropHost(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 +210,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.
+ ApplicationDragAndDropHost* drag_and_drop_host_;
+
+ // The drag operation is currently inside the dnd host and events get
+ // dispatched.
+ bool drag_and_drop_host_dispatched_drag_;
koz (OOO until 15th September) 2013/05/08 02:00:39 Maybe rename this to forward_events_to_drag_and_dr
Mr4D (OOO till 08-26) 2013/05/08 02:53:35 Done.
+
// Last mouse drag location in this view's coordinates.
gfx::Point last_drag_point_;

Powered by Google App Engine
This is Rietveld 408576698