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

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

Issue 14533006: Drag and drop between app list and launcher - First patch (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Addressed Created 7 years, 7 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 | Annotate | Revision Log
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 "base/memory/scoped_vector.h" 8 #include "base/memory/scoped_vector.h"
9 #include "base/timer.h" 9 #include "base/timer.h"
10 #include "ui/app_list/apps_grid_view_delegate.h" 10 #include "ui/app_list/apps_grid_view_delegate.h"
11 #include "ui/app_list/search_box_view_delegate.h" 11 #include "ui/app_list/search_box_view_delegate.h"
12 #include "ui/app_list/search_result_list_view_delegate.h" 12 #include "ui/app_list/search_result_list_view_delegate.h"
13 #include "ui/views/view.h" 13 #include "ui/views/view.h"
14 14
15 namespace views { 15 namespace views {
16 class Widget; 16 class Widget;
17 } 17 }
18 18
19 namespace app_list { 19 namespace app_list {
20 20
21 class ApplicationDragAndDropHost;
21 class AppListModel; 22 class AppListModel;
22 class AppListItemModel; 23 class AppListItemModel;
23 class AppListViewDelegate; 24 class AppListViewDelegate;
24 class ContentsView; 25 class ContentsView;
25 class PaginationModel; 26 class PaginationModel;
26 class SearchBoxView; 27 class SearchBoxView;
27 28
28 // AppListMainView contains the normal view of the app list, which is shown 29 // AppListMainView contains the normal view of the app list, which is shown
29 // when the user is signed in. 30 // when the user is signed in.
30 class AppListMainView : public views::View, 31 class AppListMainView : public views::View,
31 public AppsGridViewDelegate, 32 public AppsGridViewDelegate,
32 public SearchBoxViewDelegate, 33 public SearchBoxViewDelegate,
33 public SearchResultListViewDelegate { 34 public SearchResultListViewDelegate {
34 public: 35 public:
35 // Takes ownership of |delegate|. 36 // Takes ownership of |delegate|.
36 explicit AppListMainView(AppListViewDelegate* delegate, 37 explicit AppListMainView(AppListViewDelegate* delegate,
37 AppListModel* model, 38 AppListModel* model,
38 PaginationModel* pagination_model, 39 PaginationModel* pagination_model,
39 views::View* anchor); 40 views::View* anchor);
40 virtual ~AppListMainView(); 41 virtual ~AppListMainView();
41 42
42 void ShowAppListWhenReady(); 43 void ShowAppListWhenReady();
43 44
44 void Close(); 45 void Close();
45 46
46 void Prerender(); 47 void Prerender();
47 48
48 SearchBoxView* search_box_view() { return search_box_view_; } 49 SearchBoxView* search_box_view() { return search_box_view_; }
49 50
51 // If |drag_and_drop_host| is not NULL it will be called upon drag and drop
52 // operations outside the application list.
53 void SetDragAndDropHostOfCurrentAppList(
54 ApplicationDragAndDropHost* drag_and_drop_host);
55
50 private: 56 private:
51 class IconLoader; 57 class IconLoader;
52 58
53 // Loads icon image for the apps in the selected page of |pagination_model|. 59 // Loads icon image for the apps in the selected page of |pagination_model|.
54 // |anchor| is used to determine the image scale factor to use. 60 // |anchor| is used to determine the image scale factor to use.
55 void PreloadIcons(PaginationModel* pagination_model, 61 void PreloadIcons(PaginationModel* pagination_model,
56 views::View* anchor); 62 views::View* anchor);
57 63
58 // Invoked when |icon_loading_wait_timer_| fires. 64 // Invoked when |icon_loading_wait_timer_| fires.
59 void OnIconLoadingWaitTimer(); 65 void OnIconLoadingWaitTimer();
(...skipping 25 matching lines...) Expand all
85 base::OneShotTimer<AppListMainView> icon_loading_wait_timer_; 91 base::OneShotTimer<AppListMainView> icon_loading_wait_timer_;
86 92
87 ScopedVector<IconLoader> pending_icon_loaders_; 93 ScopedVector<IconLoader> pending_icon_loaders_;
88 94
89 DISALLOW_COPY_AND_ASSIGN(AppListMainView); 95 DISALLOW_COPY_AND_ASSIGN(AppListMainView);
90 }; 96 };
91 97
92 } // namespace app_list 98 } // namespace app_list
93 99
94 #endif // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_ 100 #endif // UI_APP_LIST_VIEWS_APP_LIST_MAIN_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698