Chromium Code Reviews| Index: ui/app_list/views/contents_view.h |
| diff --git a/ui/app_list/views/contents_view.h b/ui/app_list/views/contents_view.h |
| index 17ecf9366e29ae6988ce2bacfb969a3303db6ba1..effd004fa7002f54b88d70ddab537f5c19627d89 100644 |
| --- a/ui/app_list/views/contents_view.h |
| +++ b/ui/app_list/views/contents_view.h |
| @@ -15,6 +15,10 @@ |
| #include "ui/app_list/pagination_model_observer.h" |
| #include "ui/views/view.h" |
| +namespace gfx { |
| +class Rect; |
| +} |
| + |
| namespace views { |
| class ViewModel; |
| } |
| @@ -84,7 +88,11 @@ class APP_LIST_EXPORT ContentsView : public views::View, |
| // True if |named_page| is the current active laucher page. |
| bool IsNamedPageActive(NamedPage named_page) const; |
| - // Gets the index of a launcher page in |view_model_|, by NamedPage. |
| + // True if |page_index| is the index of |named_page|. |
| + bool IndexIsNamedPage(int page_index, NamedPage named_page) const; |
|
calamity
2014/09/10 01:56:40
Can we have GetPageIndexForNamedPage() return -1 i
Matt Giuca
2014/09/10 03:15:30
Done.
|
| + |
| + // Gets the index of a launcher page in |view_model_|, by NamedPage. The given |
| + // |named_page| must have a view in the view model. |
| int GetPageIndexForNamedPage(NamedPage named_page) const; |
| int NumLauncherPages() const; |
| @@ -121,6 +129,10 @@ class APP_LIST_EXPORT ContentsView : public views::View, |
| // Invoked when active view is changed. |
| void ActivePageChanged(bool show_search_results); |
| + // Gets the origin (the off-screen resting place) for a given launcher page |
| + // with index |page_index|. |bounds| is the contents bounds for this view. |
| + int PageOrigin(const gfx::Rect& bounds, int page_index) const; |
|
calamity
2014/09/10 01:56:40
Can this return a gfx::Rect() so that it's actuall
Matt Giuca
2014/09/10 03:15:30
Done & Done.
|
| + |
| // Calculates and sets the bounds for the subviews. If there is currently an |
| // animation, this positions the views as appropriate for the current frame. |
| void UpdatePageBounds(); |