| Index: ui/app_list/views/app_list_folder_view.h
|
| diff --git a/ui/app_list/views/app_list_folder_view.h b/ui/app_list/views/app_list_folder_view.h
|
| index 7052588179b10b2b6fbcf9aef86f4eb07e8a3eed..72b8fc5bd3e87d27d723fd39d6986d5319771062 100644
|
| --- a/ui/app_list/views/app_list_folder_view.h
|
| +++ b/ui/app_list/views/app_list_folder_view.h
|
| @@ -6,6 +6,7 @@
|
| #define UI_APP_LIST_VIEWS_APP_LIST_FOLDER_VIEW_H_
|
|
|
| #include "ui/app_list/app_list_item_list_observer.h"
|
| +#include "ui/app_list/views/apps_grid_view.h"
|
| #include "ui/app_list/views/folder_header_view.h"
|
| #include "ui/app_list/views/folder_header_view_delegate.h"
|
| #include "ui/compositor/layer_animation_observer.h"
|
| @@ -25,6 +26,7 @@ namespace app_list {
|
| class AppsContainerView;
|
| class AppsGridView;
|
| class AppListFolderItem;
|
| +class AppListItemView;
|
| class AppListMainView;
|
| class AppListModel;
|
| class FolderHeaderView;
|
| @@ -44,12 +46,41 @@ class AppListFolderView : public views::View,
|
| void SetAppListFolderItem(AppListFolderItem* folder);
|
|
|
| // Schedules an animation to show or hide the view.
|
| - void ScheduleShowHideAnimation(bool show);
|
| + // If |show| is false, the view should be set to invisible after the
|
| + // animation is done unless |hide_for_reparent| is true.
|
| + void ScheduleShowHideAnimation(bool show, bool hide_for_reparent);
|
|
|
| // Gets icon image bounds of the item at |index|, relative to
|
| // AppListFolderView.
|
| gfx::Rect GetItemIconBoundsAt(int index);
|
|
|
| + // Updates the folder view background to show or hide folder container ink
|
| + // bubble.
|
| + void UpdateFolderViewBackground(bool show_bubble);
|
| +
|
| + void UpdateFolderNameVisibility(bool visible);
|
| +
|
| + // Returns true if |point| falls outside of the folder container ink bubble.
|
| + bool IsPointOutsideOfFolderBoundray(const gfx::Point& point);
|
| +
|
| + // 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.
|
| + void ReparentItem(AppListItemView* original_drag_view,
|
| + const gfx::Point& drag_point_in_folder_grid);
|
| +
|
| + // Dispatches drag event from the hidden grid view to the root level grid view
|
| + // for re-parenting a folder item.
|
| + void DispatchDragEventForReparent(AppsGridView::Pointer pointer,
|
| + const ui::LocatedEvent& event);
|
| +
|
| + // 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.
|
| + void DispatchEndDragEventForReparent(bool events_forwarded_to_drag_drop_host);
|
| +
|
| // views::View overrides:
|
| virtual gfx::Size GetPreferredSize() OVERRIDE;
|
| virtual void Layout() OVERRIDE;
|
| @@ -61,9 +92,19 @@ class AppListFolderView : public views::View,
|
| // ui::ImplicitAnimationObserver overrides:
|
| virtual void OnImplicitAnimationsCompleted() OVERRIDE;
|
|
|
| + AppsGridView* items_grid_view() { return items_grid_view_; }
|
| + bool hide_for_reparent() const { return hide_for_reparent_; }
|
| +
|
| private:
|
| void CalculateIdealBounds();
|
|
|
| + // Starts setting up drag in root level apps grid view for re-parenting a
|
| + // folder item.
|
| + // |drag_point_in_root_grid| is in the cooridnates of root level AppsGridView.
|
| + void StartSetupDragInRootLevelAppsGridView(
|
| + AppListItemView* original_drag_view,
|
| + const gfx::Point& drag_point_in_root_grid);
|
| +
|
| // Overridden from FolderHeaderViewDelegate:
|
| virtual void NavigateBack(AppListFolderItem* item,
|
| const ui::Event& event_flags) OVERRIDE;
|
| @@ -79,6 +120,8 @@ class AppListFolderView : public views::View,
|
|
|
| scoped_ptr<PaginationModel> pagination_model_;
|
|
|
| + bool hide_for_reparent_;
|
| +
|
| DISALLOW_COPY_AND_ASSIGN(AppListFolderView);
|
| };
|
|
|
|
|