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

Unified Diff: ui/app_list/shower/app_list_shower_delegate.h

Issue 1830293002: AppListController refactoring part 1: AppListShower implementation. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixing target names in .isolate. Created 4 years, 8 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/shower/app_list_shower.gyp ('k') | ui/app_list/shower/app_list_shower_delegate_factory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ui/app_list/shower/app_list_shower_delegate.h
diff --git a/ui/app_list/shower/app_list_shower_delegate.h b/ui/app_list/shower/app_list_shower_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..76b35731f1760c0e32db62d73446d66b1d1c1313
--- /dev/null
+++ b/ui/app_list/shower/app_list_shower_delegate.h
@@ -0,0 +1,55 @@
+// Copyright 2016 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_SHOWER_APP_LIST_SHOWER_DELEGATE_H_
+#define UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_H_
+
+#include "ui/app_list/shower/app_list_shower_export.h"
+
+namespace aura {
+class Window;
+}
+
+namespace gfx {
+class Vector2d;
+}
+
+namespace app_list {
+
+class AppListView;
+class AppListViewDelegate;
+
+// Delegate of AppListShower which allows to customize AppListShower's behavior.
+// The design of this interface was heavily influenced by the needs of Ash's
+// app list implementation (see ash::AppListShowerDelegate).
+class APP_LIST_SHOWER_EXPORT AppListShowerDelegate {
+ public:
+ virtual ~AppListShowerDelegate() {}
+
+ // Returns the delegate for the app list view, possibly creating one.
+ virtual AppListViewDelegate* GetViewDelegate() = 0;
+
+ // Called to initialize the layout of the app list.
+ virtual void Init(AppListView* view,
+ aura::Window* root_window,
+ int current_apps_page) = 0;
+
+ // Called when app list is shown.
+ virtual void OnShown(aura::Window* root_window) = 0;
+
+ // Called when app list is dismissed
+ virtual void OnDismissed() = 0;
+
+ // Update app list bounds if necessary.
+ virtual void UpdateBounds() = 0;
+
+ // Returns the offset vector by which the app list window should animate
+ // when it gets hidden.
+ virtual gfx::Vector2d GetVisibilityAnimationOffset(
+ aura::Window* root_window) = 0;
+};
+
+} // namespace app_list
+
+#endif // UI_APP_LIST_SHOWER_APP_LIST_SHOWER_DELEGATE_H_
« no previous file with comments | « ui/app_list/shower/app_list_shower.gyp ('k') | ui/app_list/shower/app_list_shower_delegate_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698