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

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

Issue 781833005: Make SearchResultPageView animation clip to its onscreen bounds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@fix_overlay_one
Patch Set: address_comments Created 6 years 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 | « no previous file | 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 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 void UpdateCustomPageForDefaultAnimation(double progress, 55 void UpdateCustomPageForDefaultAnimation(double progress,
56 int from_page, 56 int from_page,
57 int to_page) const; 57 int to_page) const;
58 58
59 // Updates the position of the search box view, placing it in the correct 59 // Updates the position of the search box view, placing it in the correct
60 // position for the transition from |from_page| to |to_page|. 60 // position for the transition from |from_page| to |to_page|.
61 void UpdateSearchBoxForDefaultAnimation(double progress, 61 void UpdateSearchBoxForDefaultAnimation(double progress,
62 int from_page, 62 int from_page,
63 int to_page) const; 63 int to_page) const;
64 64
65 // Clips the drawing of the launcher page to its onscreen bounds if necessary.
66 void ClipPageToOnscreenBounds(int page_index,
Matt Giuca 2014/12/10 06:53:39 Can you rename this to ClipSearchResultsPageToOnsc
calamity 2014/12/11 04:41:08 Done.
67 const gfx::Rect& current_bounds,
68 const gfx::Rect& onscreen_bounds);
69
65 private: 70 private:
66 ContentsView* contents_view_; 71 ContentsView* contents_view_;
67 72
68 DISALLOW_COPY_AND_ASSIGN(ContentsAnimator); 73 DISALLOW_COPY_AND_ASSIGN(ContentsAnimator);
69 }; 74 };
70 75
71 // Simple animator that slides pages in and out vertically. Appropriate for any 76 // Simple animator that slides pages in and out vertically. Appropriate for any
72 // page pair. 77 // page pair.
73 class DefaultAnimator : public ContentsAnimator { 78 class DefaultAnimator : public ContentsAnimator {
74 public: 79 public:
(...skipping 29 matching lines...) Expand all
104 109
105 std::string NameForTests() const override; 110 std::string NameForTests() const override;
106 void Update(double progress, int start_page, int custom_page) override; 111 void Update(double progress, int start_page, int custom_page) override;
107 112
108 DISALLOW_COPY_AND_ASSIGN(StartToCustomAnimator); 113 DISALLOW_COPY_AND_ASSIGN(StartToCustomAnimator);
109 }; 114 };
110 115
111 } // namespace app_list 116 } // namespace app_list
112 117
113 #endif // UI_APP_LIST_VIEWS_CONTENTS_ANIMATOR_H_ 118 #endif // UI_APP_LIST_VIEWS_CONTENTS_ANIMATOR_H_
OLDNEW
« no previous file with comments | « no previous file | ui/app_list/views/contents_animator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698