Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 Loading... | |
| 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_ |
| OLD | NEW |