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

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

Issue 889403005: Make start page fill app list bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@new_apps_grid_paddings
Patch Set: address_comment Created 5 years, 10 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
« no previous file with comments | « ui/app_list/views/app_list_view_unittest.cc ('k') | ui/app_list/views/contents_animator.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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_ANIMATOR_H_ 5 #ifndef UI_APP_LIST_VIEWS_CONTENTS_ANIMATOR_H_
6 #define UI_APP_LIST_VIEWS_CONTENTS_ANIMATOR_H_ 6 #define UI_APP_LIST_VIEWS_CONTENTS_ANIMATOR_H_
7 7
8 #include <string> 8 #include <string>
9 9
10 #include "base/macros.h" 10 #include "base/macros.h"
(...skipping 21 matching lines...) Expand all
32 32
33 // Updates the state of the ContentsView. |progress| is the amount of progress 33 // Updates the state of the ContentsView. |progress| is the amount of progress
34 // made on the animation, where 0.0 is the beginning and 1.0 is the end. The 34 // made on the animation, where 0.0 is the beginning and 1.0 is the end. The
35 // animation should be linear (not eased in or out) so that it can be played 35 // animation should be linear (not eased in or out) so that it can be played
36 // forwards or reversed. Easing will be applied by the PaginationModel. 36 // forwards or reversed. Easing will be applied by the PaginationModel.
37 virtual void Update(double progress, int from_page, int to_page) = 0; 37 virtual void Update(double progress, int from_page, int to_page) = 0;
38 38
39 protected: 39 protected:
40 const ContentsView* contents_view() const { return contents_view_; } 40 const ContentsView* contents_view() const { return contents_view_; }
41 41
42 // Gets the on-screen page bounds for a given launcher page with index
43 // |page_index|.
44 gfx::Rect GetOnscreenPageBounds(int page_index) const;
45
46 // Gets the origin (the off-screen resting place) for a given launcher page
47 // with index |page_index|.
48 gfx::Rect GetOffscreenPageBounds(int page_index) const;
49
50 // Updates the position of the custom launcher page view (if it exists), in 42 // Updates the position of the custom launcher page view (if it exists), in
51 // the default way for start page <-> other page transitions. This places it 43 // the default way for start page <-> other page transitions. This places it
52 // into collapsed state on the start page, and hidden on any other page. Any 44 // into collapsed state on the start page, and hidden on any other page. Any
53 // other behaviour should be implemented with a custom animator. |progress|, 45 // other behaviour should be implemented with a custom animator. |progress|,
54 // |from_page| and |to_page| are parameters from Update(). 46 // |from_page| and |to_page| are parameters from Update().
55 void UpdateCustomPageForDefaultAnimation(double progress, 47 void UpdateCustomPageForDefaultAnimation(double progress,
56 int from_page, 48 int from_page,
57 int to_page) const; 49 int to_page) const;
58 50
59 // Updates the position of the search box view, placing it in the correct 51 // Updates the position of the search box view, placing it in the correct
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 std::string NameForTests() const override; 104 std::string NameForTests() const override;
113 void Update(double progress, int start_page, int custom_page) override; 105 void Update(double progress, int start_page, int custom_page) override;
114 106
115 private: 107 private:
116 DISALLOW_COPY_AND_ASSIGN(StartToCustomAnimator); 108 DISALLOW_COPY_AND_ASSIGN(StartToCustomAnimator);
117 }; 109 };
118 110
119 } // namespace app_list 111 } // namespace app_list
120 112
121 #endif // UI_APP_LIST_VIEWS_CONTENTS_ANIMATOR_H_ 113 #endif // UI_APP_LIST_VIEWS_CONTENTS_ANIMATOR_H_
OLDNEW
« no previous file with comments | « ui/app_list/views/app_list_view_unittest.cc ('k') | ui/app_list/views/contents_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698