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

Unified Diff: ui/app_list/views/apps_grid_view_folder_delegate.h

Issue 210583004: Make cancelling of app list correctly clean up folder UI. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 6 years, 9 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
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | ui/app_list/views/apps_grid_view_unittest.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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..60d8f5e59d0e8a7a9ed2faf324bb52de4739b14b
--- /dev/null
+++ b/ui/app_list/views/apps_grid_view_folder_delegate.h
@@ -0,0 +1,61 @@
+// 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;
+
+// A delegate which allows an AppsGridView to communicate with its host folder.
+class APP_LIST_EXPORT AppsGridViewFolderDelegate {
+ 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;
+
+ // Returns true if the associated folder item is an OEM folder.
+ virtual bool IsOEMFolder() const = 0;
+
+ protected:
+ virtual ~AppsGridViewFolderDelegate() {}
+};
+
+} // namespace app_list
+
+#endif // UI_APP_LIST_VIEWS_APPS_GRID_VIEW_FOLDER_DELEGATE_H_
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | ui/app_list/views/apps_grid_view_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698