Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | |
| 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_APPS_GRID_VIEW_FOLDER_DELEGATE_H_ | |
| 6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_FOLDER_DELEGATE_H_ | |
| 7 | |
| 8 #include "ui/app_list/app_list_export.h" | |
| 9 #include "ui/app_list/views/apps_grid_view.h" | |
| 10 | |
| 11 namespace gfx { | |
| 12 class Point; | |
| 13 } | |
| 14 | |
| 15 namespace ui { | |
| 16 class LocatedEvent; | |
| 17 } | |
| 18 | |
| 19 namespace app_list { | |
| 20 | |
| 21 class AppListItemView; | |
| 22 | |
| 23 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.
| |
| 24 public: | |
| 25 // Updates the folder view background to show or hide folder container ink | |
| 26 // bubble. | |
| 27 virtual void UpdateFolderViewBackground(bool show_bubble) = 0; | |
| 28 | |
| 29 // Called when a folder item is dragged out of the folder to be re-parented. | |
| 30 // |original_drag_view| is the |drag_view_| inside the folder's grid view. | |
| 31 // |drag_point_in_folder_grid| is the last drag point in coordinate of the | |
| 32 // AppsGridView inside the folder. | |
| 33 virtual void ReparentItem(AppListItemView* original_drag_view, | |
| 34 const gfx::Point& drag_point_in_folder_grid) = 0; | |
| 35 | |
| 36 // Dispatches drag event from the hidden grid view to the root level grid view | |
| 37 // for re-parenting a folder item. | |
| 38 virtual void DispatchDragEventForReparent(AppsGridView::Pointer pointer, | |
| 39 const ui::LocatedEvent& event) = 0; | |
| 40 | |
| 41 // Dispatches EndDrag event from the hidden grid view to the root level grid | |
| 42 // view for reparenting a folder item. | |
| 43 // |events_forwarded_to_drag_drop_host|: True if the dragged item is dropped | |
| 44 // to the drag_drop_host, eg. dropped on shelf. | |
| 45 virtual void DispatchEndDragEventForReparent( | |
| 46 bool events_forwarded_to_drag_drop_host) = 0; | |
| 47 | |
| 48 // Returns true if |point| falls outside of the folder container ink bubble. | |
| 49 virtual bool IsPointOutsideOfFolderBoundary(const gfx::Point& point) = 0; | |
| 50 | |
| 51 protected: | |
| 52 virtual ~AppsGridViewFolderDelegate() {} | |
| 53 }; | |
| 54 | |
| 55 } // namespace app_list | |
| 56 | |
| 57 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_FOLDER_DELEGATE_H_ | |
| OLD | NEW |