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 { SHOW_APPS, SHOW_SEARCH_RESULTS, }; | 40 enum ShowState { |
41 SHOW_APPS, | |
42 SHOW_SEARCH_RESULTS, | |
43 SHOW_START_PAGE, | |
44 }; | |
40 | 45 |
41 ContentsView(AppListMainView* app_list_main_view, | 46 ContentsView(AppListMainView* app_list_main_view, |
42 PaginationModel* pagination_model, | 47 PaginationModel* pagination_model, |
43 AppListModel* model, | 48 AppListModel* model, |
44 AppListViewDelegate* view_delegate); | 49 AppListViewDelegate* view_delegate); |
45 virtual ~ContentsView(); | 50 virtual ~ContentsView(); |
46 | 51 |
47 // 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. |
48 void CancelDrag(); | 53 void CancelDrag(); |
49 | 54 |
(...skipping 26 matching lines...) Expand all Loading... | |
76 void AnimateToIdealBounds(); | 81 void AnimateToIdealBounds(); |
77 | 82 |
78 // Overridden from ui::EventHandler: | 83 // Overridden from ui::EventHandler: |
79 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; | 84 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; |
80 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; | 85 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; |
81 | 86 |
82 ShowState show_state_; | 87 ShowState show_state_; |
83 PaginationModel* pagination_model_; // Owned by AppListController. | 88 PaginationModel* pagination_model_; // Owned by AppListController. |
84 | 89 |
85 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_; | |
tapted
2014/05/07 08:19:17
nit: add ownership comment - e.g. // Parent view,
calamity
2014/05/08 07:46:32
Done.
| |
86 | 92 |
87 scoped_ptr<views::ViewModel> view_model_; | 93 scoped_ptr<views::ViewModel> view_model_; |
88 scoped_ptr<views::BoundsAnimator> bounds_animator_; | 94 scoped_ptr<views::BoundsAnimator> bounds_animator_; |
89 | 95 |
90 DISALLOW_COPY_AND_ASSIGN(ContentsView); | 96 DISALLOW_COPY_AND_ASSIGN(ContentsView); |
91 }; | 97 }; |
92 | 98 |
93 } // namespace app_list | 99 } // namespace app_list |
94 | 100 |
95 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ | 101 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ |
OLD | NEW |