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

Unified Diff: ash/shelf/shelf_view.cc

Issue 598013003: Added views::ViewModelT<T>, a type-safe template version of ViewModel. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@appsgridview-static-casts
Patch Set: DISALLOW_COPY_AND_ASSIGN. Created 6 years, 3 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
Index: ash/shelf/shelf_view.cc
diff --git a/ash/shelf/shelf_view.cc b/ash/shelf/shelf_view.cc
index 42545c714b8dacc1fcda101f61be301d24ad2b5f..a48fa338b6d172859207dd98fe775e82838bc69a 100644
--- a/ash/shelf/shelf_view.cc
+++ b/ash/shelf/shelf_view.cc
@@ -222,7 +222,7 @@ bool ShelfMenuModelAdapter::ShouldReserveSpaceForSubmenuIndicator() const {
// the ViewModel.
class ShelfFocusSearch : public views::FocusSearch {
public:
- explicit ShelfFocusSearch(views::ViewModel* view_model)
+ explicit ShelfFocusSearch(views::ViewModel<views::View>* view_model)
: FocusSearch(NULL, true, true),
view_model_(view_model) {}
virtual ~ShelfFocusSearch() {}
@@ -252,7 +252,7 @@ class ShelfFocusSearch : public views::FocusSearch {
}
private:
- views::ViewModel* view_model_;
+ views::ViewModel<views::View>* view_model_;
DISALLOW_COPY_AND_ASSIGN(ShelfFocusSearch);
};
@@ -369,7 +369,7 @@ ShelfView::ShelfView(ShelfModel* model,
ShelfLayoutManager* manager)
: model_(model),
delegate_(delegate),
- view_model_(new views::ViewModel),
+ view_model_(new views::ViewModel<views::View>),
first_visible_index_(0),
last_visible_index_(-1),
overflow_button_(NULL),

Powered by Google App Engine
This is Rietveld 408576698