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

Unified Diff: ash/shelf/shelf_view.cc

Issue 273223002: views: Make view::Views::GetPreferredSize() const. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: More compile fix for ToT Created 6 years, 7 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ash/shelf/shelf_view.h ('k') | ash/shell/lock_view.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view.cc
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 1cc1cf61203d2e22519615086d8dfb21a5564d52..65d09fde97be4b84d393c1578b7c0cf7835dfa00 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -702,7 +702,7 @@ void ShelfView::UpdateAllButtonsVisibilityInOverflowMode() {
}
}
-void ShelfView::CalculateIdealBounds(IdealBounds* bounds) {
+void ShelfView::CalculateIdealBounds(IdealBounds* bounds) const {
int available_size = layout_manager_->PrimaryAxisValue(width(), height());
DCHECK(model_->item_count() == view_model_->view_size());
if (!available_size)
@@ -732,7 +732,7 @@ void ShelfView::CalculateIdealBounds(IdealBounds* bounds) {
}
if (is_overflow_mode()) {
- UpdateAllButtonsVisibilityInOverflowMode();
+ const_cast<ShelfView*>(this)->UpdateAllButtonsVisibilityInOverflowMode();
return;
}
@@ -1162,7 +1162,7 @@ void ShelfView::FinalizeRipOffDrag(bool cancel) {
DestroyDragIconProxy();
}
-ShelfView::RemovableState ShelfView::RemovableByRipOff(int index) {
+ShelfView::RemovableState ShelfView::RemovableByRipOff(int index) const {
DCHECK(index >= 0 && index < model_->item_count());
ShelfItemType type = model_->items()[index].type;
if (type == TYPE_APP_LIST || type == TYPE_DIALOG || !delegate_->CanPin())
@@ -1253,7 +1253,7 @@ void ShelfView::StartFadeInLastVisibleItem() {
}
}
-void ShelfView::UpdateOverflowRange(ShelfView* overflow_view) {
+void ShelfView::UpdateOverflowRange(ShelfView* overflow_view) const {
const int first_overflow_index = last_visible_index_ + 1;
const int last_overflow_index = last_hidden_index_;
DCHECK_LE(first_overflow_index, last_overflow_index);
@@ -1356,7 +1356,7 @@ int ShelfView::CancelDrag(int modified_index) {
return modified_view ? view_model_->GetIndexOfView(modified_view) : -1;
}
-gfx::Size ShelfView::GetPreferredSize() {
+gfx::Size ShelfView::GetPreferredSize() const {
IdealBounds ideal_bounds;
CalculateIdealBounds(&ideal_bounds);
« no previous file with comments | « ash/shelf/shelf_view.h ('k') | ash/shell/lock_view.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698