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

Side by Side Diff: ui/app_list/views/app_list_main_view.h

Issue 913133007: Allow scroll events to open custom launcher pages. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: host coordinates Created 5 years, 10 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 unified diff | Download patch
OLDNEW
1 // Copyright 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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_APP_LIST_MAIN_VIEW_H_ 5 #ifndef UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_
6 #define UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ 6 #define UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/memory/scoped_vector.h" 10 #include "base/memory/scoped_vector.h"
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
51 void ResetForShow(); 51 void ResetForShow();
52 52
53 void Close(); 53 void Close();
54 54
55 void Prerender(); 55 void Prerender();
56 56
57 void ModelChanged(); 57 void ModelChanged();
58 58
59 SearchBoxView* search_box_view() const { return search_box_view_; } 59 SearchBoxView* search_box_view() const { return search_box_view_; }
60 60
61 // Gets the invisible widget that sits partly over the bottom of the app list,
62 // covering the collapsed-state custom page. May return nullptr, if the widget
63 // has not been initialized or has already been destroyed.
64 views::Widget* GetCustomPageClickzone() const;
65
66 // If |drag_and_drop_host| is not NULL it will be called upon drag and drop 61 // If |drag_and_drop_host| is not NULL it will be called upon drag and drop
67 // operations outside the application list. 62 // operations outside the application list.
68 void SetDragAndDropHostOfCurrentAppList( 63 void SetDragAndDropHostOfCurrentAppList(
69 ApplicationDragAndDropHost* drag_and_drop_host); 64 ApplicationDragAndDropHost* drag_and_drop_host);
70 65
71 ContentsView* contents_view() const { return contents_view_; } 66 ContentsView* contents_view() const { return contents_view_; }
72 AppListModel* model() { return model_; } 67 AppListModel* model() { return model_; }
73 AppListViewDelegate* view_delegate() { return delegate_; } 68 AppListViewDelegate* view_delegate() { return delegate_; }
74 69
75 // Returns true if the app list should be centered and in landscape mode. 70 // Returns true if the app list should be centered and in landscape mode.
76 bool ShouldCenterWindow() const; 71 bool ShouldCenterWindow() const;
77 72
78 // Called when the search box's visibility is changed. 73 // Called when the search box's visibility is changed.
79 void NotifySearchBoxVisibilityChanged(); 74 void NotifySearchBoxVisibilityChanged();
80 75
81 // Initialize widgets that live inside the app list's main widget.
82 void InitWidgets();
83
84 // Overridden from AppListModelObserver: 76 // Overridden from AppListModelObserver:
85 void OnCustomLauncherPageEnabledStateChanged(bool enabled) override; 77 void OnCustomLauncherPageEnabledStateChanged(bool enabled) override;
86 78
87 private: 79 private:
88 class IconLoader; 80 class IconLoader;
89 81
90 // Adds the ContentsView. 82 // Adds the ContentsView.
91 void AddContentsViews(); 83 void AddContentsViews();
92 84
93 // Gets the PaginationModel owned by the AppsGridView. 85 // Gets the PaginationModel owned by the AppsGridView.
(...skipping 23 matching lines...) Expand all
117 // Overridden from SearchResultListViewDelegate: 109 // Overridden from SearchResultListViewDelegate:
118 void OnResultInstalled(SearchResult* result) override; 110 void OnResultInstalled(SearchResult* result) override;
119 111
120 AppListViewDelegate* delegate_; // Owned by parent view (AppListView). 112 AppListViewDelegate* delegate_; // Owned by parent view (AppListView).
121 AppListModel* model_; // Unowned; ownership is handled by |delegate_|. 113 AppListModel* model_; // Unowned; ownership is handled by |delegate_|.
122 114
123 // Created by AppListView. Owned by views hierarchy. 115 // Created by AppListView. Owned by views hierarchy.
124 SearchBoxView* search_box_view_; 116 SearchBoxView* search_box_view_;
125 ContentsView* contents_view_; // Owned by views hierarchy. 117 ContentsView* contents_view_; // Owned by views hierarchy.
126 118
127 // Invisible widget that sits partly over the bottom of the app list, covering
128 // the collapsed-state custom page, and intercepts click events. Always use
129 // GetCustomPageClickzone() to access this (do not access it directly).
130 views::Widget* custom_page_clickzone_; // Owned by the app list widget.
131
132 // A timer that fires when maximum allowed time to wait for icon loading has 119 // A timer that fires when maximum allowed time to wait for icon loading has
133 // passed. 120 // passed.
134 base::OneShotTimer<AppListMainView> icon_loading_wait_timer_; 121 base::OneShotTimer<AppListMainView> icon_loading_wait_timer_;
135 122
136 ScopedVector<IconLoader> pending_icon_loaders_; 123 ScopedVector<IconLoader> pending_icon_loaders_;
137 124
138 base::WeakPtrFactory<AppListMainView> weak_ptr_factory_; 125 base::WeakPtrFactory<AppListMainView> weak_ptr_factory_;
139 126
140 DISALLOW_COPY_AND_ASSIGN(AppListMainView); 127 DISALLOW_COPY_AND_ASSIGN(AppListMainView);
141 }; 128 };
142 129
143 } // namespace app_list 130 } // namespace app_list
144 131
145 #endif // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ 132 #endif // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698