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_CONTENTS_VIEW_H_ | 5 #ifndef UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ |
6 #define UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ | 6 #define UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "base/memory/scoped_ptr.h" | 10 #include "base/memory/scoped_ptr.h" |
(...skipping 11 matching lines...) Expand all Loading... | |
22 namespace app_list { | 22 namespace app_list { |
23 | 23 |
24 class AppsGridView; | 24 class AppsGridView; |
25 class ApplicationDragAndDropHost; | 25 class ApplicationDragAndDropHost; |
26 class AppListFolderItem; | 26 class AppListFolderItem; |
27 class AppListMainView; | 27 class AppListMainView; |
28 class AppListModel; | 28 class AppListModel; |
29 class AppListViewDelegate; | 29 class AppListViewDelegate; |
30 class AppsContainerView; | 30 class AppsContainerView; |
31 class PaginationModel; | 31 class PaginationModel; |
32 class StartPageView; | |
32 | 33 |
33 // A view to manage sub views under the search box (apps grid view + page | 34 // A view to manage sub views under the search box (apps grid view + page |
34 // switcher and search results). The two sets of sub views are mutually | 35 // switcher and search results). The two sets of sub views are mutually |
35 // exclusive. ContentsView manages a show state to choose one set to show | 36 // exclusive. ContentsView manages a show state to choose one set to show |
36 // and animates the transition between show states. | 37 // and animates the transition between show states. |
37 class ContentsView : public views::View { | 38 class ContentsView : public views::View { |
38 public: | 39 public: |
39 enum ShowState { | 40 enum ShowState { |
40 SHOW_APPS, | 41 SHOW_APPS, |
41 SHOW_SEARCH_RESULTS, | 42 SHOW_SEARCH_RESULTS, |
43 SHOW_START_PAGE, | |
tapted
2014/03/10 02:41:54
Maybe go with SHOW_SEARCH_PAGE? I don't think we s
calamity
2014/03/14 07:50:02
See below.
| |
42 }; | 44 }; |
43 | 45 |
44 ContentsView(AppListMainView* app_list_main_view, | 46 ContentsView(AppListMainView* app_list_main_view, |
45 PaginationModel* pagination_model, | 47 PaginationModel* pagination_model, |
46 AppListModel* model, | 48 AppListModel* model, |
47 AppListViewDelegate* view_delegate); | 49 AppListViewDelegate* view_delegate); |
48 virtual ~ContentsView(); | 50 virtual ~ContentsView(); |
49 | 51 |
50 // The app list gets closed and drag and drop operations need to be cancelled. | 52 // The app list gets closed and drag and drop operations need to be cancelled. |
51 void CancelDrag(); | 53 void CancelDrag(); |
(...skipping 27 matching lines...) Expand all Loading... | |
79 void AnimateToIdealBounds(); | 81 void AnimateToIdealBounds(); |
80 | 82 |
81 // Overridden from ui::EventHandler: | 83 // Overridden from ui::EventHandler: |
82 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 84 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
83 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; | 85 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; |
84 | 86 |
85 ShowState show_state_; | 87 ShowState show_state_; |
86 PaginationModel* pagination_model_; // Owned by AppListController. | 88 PaginationModel* pagination_model_; // Owned by AppListController. |
87 | 89 |
88 AppsContainerView* apps_container_view_; // Owned by the views hierarchy. | 90 AppsContainerView* apps_container_view_; // Owned by the views hierarchy. |
91 AppListMainView* app_list_main_view_; // Owned by the views hierarchy. | |
tapted
2014/03/10 02:41:54
In keeping with the other GetFooView(..) functions
calamity
2014/03/14 07:50:02
Done.
| |
92 StartPageView* start_page_view_; // Owned by the views hierarchy. | |
tapted
2014/03/10 02:41:54
This doesn't seem to be used/initialized - remove?
calamity
2014/03/14 07:50:02
Done.
| |
89 | 93 |
90 scoped_ptr<views::ViewModel> view_model_; | 94 scoped_ptr<views::ViewModel> view_model_; |
91 scoped_ptr<views::BoundsAnimator> bounds_animator_; | 95 scoped_ptr<views::BoundsAnimator> bounds_animator_; |
92 | 96 |
93 DISALLOW_COPY_AND_ASSIGN(ContentsView); | 97 DISALLOW_COPY_AND_ASSIGN(ContentsView); |
94 }; | 98 }; |
95 | 99 |
96 } // namespace app_list | 100 } // namespace app_list |
97 | 101 |
98 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ | 102 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ |
OLD | NEW |