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

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

Issue 291653003: Add a unit test for the experimental app list. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 (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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
59 59
60 void ShowSearchResults(bool show); 60 void ShowSearchResults(bool show);
61 void ShowFolderContent(AppListFolderItem* folder); 61 void ShowFolderContent(AppListFolderItem* folder);
62 62
63 // Sets show state and animates the subviews to match the show state. 63 // Sets show state and animates the subviews to match the show state.
64 void SetShowState(ShowState show_state); 64 void SetShowState(ShowState show_state);
65 65
66 void Prerender(); 66 void Prerender();
67 67
68 AppsContainerView* apps_container_view() { return apps_container_view_; } 68 AppsContainerView* apps_container_view() { return apps_container_view_; }
69 StartPageView* start_page_view() { return start_page_view_; }
69 70
70 ShowState show_state() const { return show_state_; } 71 ShowState show_state() const { return show_state_; }
71 72
72 // Overridden from views::View: 73 // Overridden from views::View:
73 virtual gfx::Size GetPreferredSize() OVERRIDE; 74 virtual gfx::Size GetPreferredSize() OVERRIDE;
74 virtual void Layout() OVERRIDE; 75 virtual void Layout() OVERRIDE;
75 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE; 76 virtual bool OnKeyPressed(const ui::KeyEvent& event) OVERRIDE;
76 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE; 77 virtual bool OnMouseWheel(const ui::MouseWheelEvent& event) OVERRIDE;
77 78
78 private: 79 private:
79 // Invoked when show state is changed. 80 // Invoked when show state is changed.
80 void ShowStateChanged(); 81 void ShowStateChanged();
81 82
82 void CalculateIdealBounds(); 83 void CalculateIdealBounds();
83 void AnimateToIdealBounds(); 84 void AnimateToIdealBounds();
84 85
85 // Overridden from ui::EventHandler: 86 // Overridden from ui::EventHandler:
86 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE; 87 virtual void OnGestureEvent(ui::GestureEvent* event) OVERRIDE;
87 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE; 88 virtual void OnScrollEvent(ui::ScrollEvent* event) OVERRIDE;
88 89
89 ShowState show_state_; 90 ShowState show_state_;
90 PaginationModel* pagination_model_; // Owned by AppListController. 91 PaginationModel* pagination_model_; // Owned by AppListController.
91 92
92 AppsContainerView* apps_container_view_; // Owned by the views hierarchy. 93 AppsContainerView* apps_container_view_; // Owned by the views hierarchy.
94 StartPageView* start_page_view_; // Owned by the views hierarchy.
95
93 AppListMainView* app_list_main_view_; // Parent view, owns this. 96 AppListMainView* app_list_main_view_; // Parent view, owns this.
94 97
95 scoped_ptr<views::ViewModel> view_model_; 98 scoped_ptr<views::ViewModel> view_model_;
96 scoped_ptr<views::BoundsAnimator> bounds_animator_; 99 scoped_ptr<views::BoundsAnimator> bounds_animator_;
97 100
98 DISALLOW_COPY_AND_ASSIGN(ContentsView); 101 DISALLOW_COPY_AND_ASSIGN(ContentsView);
99 }; 102 };
100 103
101 } // namespace app_list 104 } // namespace app_list
102 105
103 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_ 106 #endif // UI_APP_LIST_VIEWS_CONTENTS_VIEW_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698