Index: ui/app_list/views/apps_grid_view_folder_delegate.h |
diff --git a/ui/app_list/views/apps_grid_view_folder_delegate.h b/ui/app_list/views/apps_grid_view_folder_delegate.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..2cc399f3f5cf193482c7a122df59f3d65f7e4063 |
--- /dev/null |
+++ b/ui/app_list/views/apps_grid_view_folder_delegate.h |
@@ -0,0 +1,57 @@ |
+// Copyright 2014 The Chromium Authors. All rights reserved. |
+// Use of this source code is governed by a BSD-style license that can be |
+// found in the LICENSE file. |
+ |
+#ifndef UI_APP_LIST_VIEWS_APPS_GRID_VIEW_FOLDER_DELEGATE_H_ |
+#define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_FOLDER_DELEGATE_H_ |
+ |
+#include "ui/app_list/app_list_export.h" |
+#include "ui/app_list/views/apps_grid_view.h" |
+ |
+namespace gfx { |
+class Point; |
+} |
+ |
+namespace ui { |
+class LocatedEvent; |
+} |
+ |
+namespace app_list { |
+ |
+class AppListItemView; |
+ |
+class APP_LIST_EXPORT AppsGridViewFolderDelegate { |
tapted
2014/03/26 02:53:54
all classes in headers should have a class comment
calamity
2014/03/27 05:14:44
Done.
|
+ public: |
+ // Updates the folder view background to show or hide folder container ink |
+ // bubble. |
+ virtual void UpdateFolderViewBackground(bool show_bubble) = 0; |
+ |
+ // Called when a folder item is dragged out of the folder to be re-parented. |
+ // |original_drag_view| is the |drag_view_| inside the folder's grid view. |
+ // |drag_point_in_folder_grid| is the last drag point in coordinate of the |
+ // AppsGridView inside the folder. |
+ virtual void ReparentItem(AppListItemView* original_drag_view, |
+ const gfx::Point& drag_point_in_folder_grid) = 0; |
+ |
+ // Dispatches drag event from the hidden grid view to the root level grid view |
+ // for re-parenting a folder item. |
+ virtual void DispatchDragEventForReparent(AppsGridView::Pointer pointer, |
+ const ui::LocatedEvent& event) = 0; |
+ |
+ // Dispatches EndDrag event from the hidden grid view to the root level grid |
+ // view for reparenting a folder item. |
+ // |events_forwarded_to_drag_drop_host|: True if the dragged item is dropped |
+ // to the drag_drop_host, eg. dropped on shelf. |
+ virtual void DispatchEndDragEventForReparent( |
+ bool events_forwarded_to_drag_drop_host) = 0; |
+ |
+ // Returns true if |point| falls outside of the folder container ink bubble. |
+ virtual bool IsPointOutsideOfFolderBoundary(const gfx::Point& point) = 0; |
+ |
+ protected: |
+ virtual ~AppsGridViewFolderDelegate() {} |
+}; |
+ |
+} // namespace app_list |
+ |
+#endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_FOLDER_DELEGATE_H_ |