| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ |
| 6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ |
| 7 | 7 |
| 8 #include <set> | 8 #include <set> |
| 9 #include <string> | 9 #include <string> |
| 10 | 10 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 // Called from AppListItemView when it receives a drag event. Returns true | 109 // Called from AppListItemView when it receives a drag event. Returns true |
| 110 // if the drag is still happening. | 110 // if the drag is still happening. |
| 111 bool UpdateDragFromItem(Pointer pointer, const ui::LocatedEvent& event); | 111 bool UpdateDragFromItem(Pointer pointer, const ui::LocatedEvent& event); |
| 112 | 112 |
| 113 // Called when the user is dragging an app. |point| is in grid view | 113 // Called when the user is dragging an app. |point| is in grid view |
| 114 // coordinates. | 114 // coordinates. |
| 115 void UpdateDrag(Pointer pointer, const gfx::Point& point); | 115 void UpdateDrag(Pointer pointer, const gfx::Point& point); |
| 116 void EndDrag(bool cancel); | 116 void EndDrag(bool cancel); |
| 117 bool IsDraggedView(const views::View* view) const; | 117 bool IsDraggedView(const views::View* view) const; |
| 118 void ClearDragState(bool cancel_reparent); | 118 void ClearDragState(bool cancel_reparent); |
| 119 void SetDragViewVisible(bool visible); |
| 119 | 120 |
| 120 // Set the drag and drop host for application links. | 121 // Set the drag and drop host for application links. |
| 121 void SetDragAndDropHostOfCurrentAppList( | 122 void SetDragAndDropHostOfCurrentAppList( |
| 122 ApplicationDragAndDropHost* drag_and_drop_host); | 123 ApplicationDragAndDropHost* drag_and_drop_host); |
| 123 | 124 |
| 124 // Prerenders the icons on and around |page_index|. | 125 // Prerenders the icons on and around |page_index|. |
| 125 void Prerender(int page_index); | 126 void Prerender(int page_index); |
| 126 | 127 |
| 127 bool has_dragged_view() const { return drag_view_ != NULL; } | 128 bool has_dragged_view() const { return drag_view_ != NULL; } |
| 128 bool dragging() const { return drag_pointer_ != NONE; } | 129 bool dragging() const { return drag_pointer_ != NONE; } |
| (...skipping 409 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 538 | 539 |
| 539 // True if the drag_view_ item is a folder item being dragged for reparenting. | 540 // True if the drag_view_ item is a folder item being dragged for reparenting. |
| 540 bool dragging_for_reparent_item_; | 541 bool dragging_for_reparent_item_; |
| 541 | 542 |
| 542 DISALLOW_COPY_AND_ASSIGN(AppsGridView); | 543 DISALLOW_COPY_AND_ASSIGN(AppsGridView); |
| 543 }; | 544 }; |
| 544 | 545 |
| 545 } // namespace app_list | 546 } // namespace app_list |
| 546 | 547 |
| 547 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ | 548 #endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_H_ |
| OLD | NEW |