| 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 #include "ui/app_list/views/search_result_page_view.h" | 5 #include "ui/app_list/views/search_result_page_view.h" |
| 6 | 6 |
| 7 #include <stddef.h> | 7 #include <stddef.h> |
| 8 | 8 |
| 9 #include <algorithm> | 9 #include <algorithm> |
| 10 | 10 |
| (...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 229 void SearchResultPageView::OnAnimationUpdated(double progress, | 229 void SearchResultPageView::OnAnimationUpdated(double progress, |
| 230 AppListModel::State from_state, | 230 AppListModel::State from_state, |
| 231 AppListModel::State to_state) { | 231 AppListModel::State to_state) { |
| 232 if (from_state != AppListModel::STATE_SEARCH_RESULTS && | 232 if (from_state != AppListModel::STATE_SEARCH_RESULTS && |
| 233 to_state != AppListModel::STATE_SEARCH_RESULTS) { | 233 to_state != AppListModel::STATE_SEARCH_RESULTS) { |
| 234 return; | 234 return; |
| 235 } | 235 } |
| 236 | 236 |
| 237 gfx::Rect onscreen_bounds( | 237 gfx::Rect onscreen_bounds( |
| 238 GetPageBoundsForState(AppListModel::STATE_SEARCH_RESULTS)); | 238 GetPageBoundsForState(AppListModel::STATE_SEARCH_RESULTS)); |
| 239 set_clip_insets(bounds().InsetsFrom(onscreen_bounds)); | 239 onscreen_bounds -= bounds().OffsetFromOrigin(); |
| 240 gfx::Path path; |
| 241 path.addRect(gfx::RectToSkRect(onscreen_bounds)); |
| 242 set_clip_path(path); |
| 240 } | 243 } |
| 241 | 244 |
| 242 int SearchResultPageView::GetSearchBoxZHeight() const { | 245 int SearchResultPageView::GetSearchBoxZHeight() const { |
| 243 return switches::IsExperimentalAppListEnabled() | 246 return switches::IsExperimentalAppListEnabled() |
| 244 ? kSearchResultZHeight | 247 ? kSearchResultZHeight |
| 245 : AppListPage::GetSearchBoxZHeight(); | 248 : AppListPage::GetSearchBoxZHeight(); |
| 246 } | 249 } |
| 247 | 250 |
| 248 void SearchResultPageView::OnHidden() { | 251 void SearchResultPageView::OnHidden() { |
| 249 ClearSelectedIndex(); | 252 ClearSelectedIndex(); |
| 250 } | 253 } |
| 251 | 254 |
| 252 } // namespace app_list | 255 } // namespace app_list |
| OLD | NEW |