| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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/contents_view.h" | 5 #include "ui/app_list/views/contents_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 349 | 349 |
| 350 // There shouldn't be duplicates in either map. | 350 // There shouldn't be duplicates in either map. |
| 351 DCHECK(success); | 351 DCHECK(success); |
| 352 return page_index; | 352 return page_index; |
| 353 } | 353 } |
| 354 | 354 |
| 355 gfx::Rect ContentsView::GetDefaultSearchBoxBounds() const { | 355 gfx::Rect ContentsView::GetDefaultSearchBoxBounds() const { |
| 356 gfx::Rect search_box_bounds(0, 0, GetDefaultContentsSize().width(), | 356 gfx::Rect search_box_bounds(0, 0, GetDefaultContentsSize().width(), |
| 357 GetSearchBoxView()->GetPreferredSize().height()); | 357 GetSearchBoxView()->GetPreferredSize().height()); |
| 358 if (switches::IsExperimentalAppListEnabled()) { | 358 if (switches::IsExperimentalAppListEnabled()) { |
| 359 search_box_bounds.set_y(kExperimentalWindowPadding); | 359 search_box_bounds.set_y(kExperimentalSearchBoxPadding); |
| 360 search_box_bounds.Inset(kExperimentalWindowPadding, 0); | 360 search_box_bounds.Inset(kExperimentalSearchBoxPadding, 0); |
| 361 } | 361 } |
| 362 return search_box_bounds; | 362 return search_box_bounds; |
| 363 } | 363 } |
| 364 | 364 |
| 365 gfx::Rect ContentsView::GetSearchBoxBoundsForState( | 365 gfx::Rect ContentsView::GetSearchBoxBoundsForState( |
| 366 AppListModel::State state) const { | 366 AppListModel::State state) const { |
| 367 // On the start page, the search box is in a different location. | 367 // On the start page, the search box is in a different location. |
| 368 if (state == AppListModel::STATE_START) { | 368 if (state == AppListModel::STATE_START) { |
| 369 DCHECK(start_page_view_); | 369 DCHECK(start_page_view_); |
| 370 // Convert to ContentsView space, assuming that the StartPageView is in the | 370 // Convert to ContentsView space, assuming that the StartPageView is in the |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 514 } | 514 } |
| 515 | 515 |
| 516 void ContentsView::TransitionStarted() { | 516 void ContentsView::TransitionStarted() { |
| 517 } | 517 } |
| 518 | 518 |
| 519 void ContentsView::TransitionChanged() { | 519 void ContentsView::TransitionChanged() { |
| 520 UpdatePageBounds(); | 520 UpdatePageBounds(); |
| 521 } | 521 } |
| 522 | 522 |
| 523 } // namespace app_list | 523 } // namespace app_list |
| OLD | NEW |