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

Unified Diff: ash/shelf/shelf_view.h

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
« no previous file with comments | « no previous file | ash/shelf/shelf_view.cc » ('j') | ui/views/view_model.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ash/shelf/shelf_view.h
diff --git a/ash/shelf/shelf_view.h b/ash/shelf/shelf_view.h
index e4344e6aa7f15283af20f94059765fce5e75f582..eabf429c5c06fff07a5eb20753bdbf4d0fe69127 100644
--- a/ash/shelf/shelf_view.h
+++ b/ash/shelf/shelf_view.h
@@ -18,6 +18,7 @@
#include "ui/views/controls/button/button.h"
#include "ui/views/focus/focus_manager.h"
#include "ui/views/view.h"
+#include "ui/views/view_model.h"
namespace ui {
class MenuModel;
@@ -26,7 +27,6 @@ class MenuModel;
namespace views {
class BoundsAnimator;
class MenuRunner;
-class ViewModel;
}
namespace ash {
@@ -133,7 +133,7 @@ class ASH_EXPORT ShelfView : public views::View,
virtual void EndDrag(bool cancel) OVERRIDE;
// Return the view model for test purposes.
- const views::ViewModel* view_model_for_test() const {
+ const views::ViewModel<views::View>* view_model_for_test() const {
return view_model_.get();
}
@@ -331,7 +331,7 @@ class ASH_EXPORT ShelfView : public views::View,
// Used to manage the set of active launcher buttons. There is a view per
// item in |model_|.
- scoped_ptr<views::ViewModel> view_model_;
+ scoped_ptr<views::ViewModel<views::View>> view_model_;
// Index of first visible launcher item.
int first_visible_index_;
« no previous file with comments | « no previous file | ash/shelf/shelf_view.cc » ('j') | ui/views/view_model.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698