| 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 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 ShowSearchResults(false); | 406 ShowSearchResults(false); |
| 407 break; | 407 break; |
| 408 case AppListModel::INVALID_STATE: // Falls through. | 408 case AppListModel::INVALID_STATE: // Falls through. |
| 409 NOTREACHED(); | 409 NOTREACHED(); |
| 410 break; | 410 break; |
| 411 } | 411 } |
| 412 return true; | 412 return true; |
| 413 } | 413 } |
| 414 | 414 |
| 415 gfx::Size ContentsView::GetDefaultContentsSize() const { | 415 gfx::Size ContentsView::GetDefaultContentsSize() const { |
| 416 return apps_container_view_->apps_grid_view()->GetPreferredSize(); | 416 return apps_container_view_->GetPreferredSize(); |
| 417 } | 417 } |
| 418 | 418 |
| 419 gfx::Size ContentsView::GetPreferredSize() const { | 419 gfx::Size ContentsView::GetPreferredSize() const { |
| 420 gfx::Rect search_box_bounds = GetDefaultSearchBoxBounds(); | 420 gfx::Rect search_box_bounds = GetDefaultSearchBoxBounds(); |
| 421 gfx::Rect default_contents_bounds = GetDefaultContentsBounds(); | 421 gfx::Rect default_contents_bounds = GetDefaultContentsBounds(); |
| 422 gfx::Vector2d bottom_right = | 422 gfx::Vector2d bottom_right = |
| 423 search_box_bounds.bottom_right().OffsetFromOrigin(); | 423 search_box_bounds.bottom_right().OffsetFromOrigin(); |
| 424 bottom_right.SetToMax( | 424 bottom_right.SetToMax( |
| 425 default_contents_bounds.bottom_right().OffsetFromOrigin()); | 425 default_contents_bounds.bottom_right().OffsetFromOrigin()); |
| 426 return gfx::Size(bottom_right.x(), bottom_right.y()); | 426 return gfx::Size(bottom_right.x(), bottom_right.y()); |
| (...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 480 } | 480 } |
| 481 | 481 |
| 482 void ContentsView::TransitionStarted() { | 482 void ContentsView::TransitionStarted() { |
| 483 } | 483 } |
| 484 | 484 |
| 485 void ContentsView::TransitionChanged() { | 485 void ContentsView::TransitionChanged() { |
| 486 UpdatePageBounds(); | 486 UpdatePageBounds(); |
| 487 } | 487 } |
| 488 | 488 |
| 489 } // namespace app_list | 489 } // namespace app_list |
| OLD | NEW |