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

Side by Side Diff: ui/app_list/views/contents_view.cc

Issue 1842373004: AppListFolderView now reports the correct size. [Refactor] (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@applist-learnmore-period
Patch Set: Avoid dependency patch sets. Created 4 years, 8 months 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 | « ui/app_list/views/apps_grid_view.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « ui/app_list/views/apps_grid_view.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698