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

Unified Diff: chrome/browser/ui/views/tabs/stacked_tab_strip_layout.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: Fix browser_test compile on ChromeOS (missing include). Created 6 years, 2 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: chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h
diff --git a/chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h b/chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h
index f9624d567f37ec1934b8530848e3fd514020bfa8..e5e49ee3b662af213ef19375cbe93bd36fa1c39d 100644
--- a/chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h
+++ b/chrome/browser/ui/views/tabs/stacked_tab_strip_layout.h
@@ -11,9 +11,7 @@
#include "ui/gfx/size.h"
#include "ui/views/view_model.h"
-namespace views {
-class ViewModel;
-}
+class Tab;
// StackedTabStripLayout is used by TabStrip in touch
// mode. StackedTabStripLayout is responsible for managing the bounds of the
@@ -36,7 +34,7 @@ class StackedTabStripLayout {
int padding,
int stacked_padding,
int max_stacked_count,
- views::ViewModel* view_model);
+ views::ViewModelBase* view_model);
~StackedTabStripLayout();
// Sets the x-coordinate the normal tabs start at as well as the mini-tab
@@ -217,7 +215,9 @@ class StackedTabStripLayout {
const int max_stacked_count_;
// Where bounds are placed. This is owned by TabStrip.
- views::ViewModel* view_model_;
+ // (Note: This is a ViewModelBase, not a ViewModelT<Tab>, because the tests do
+ // not populate the model with Tab views.)
+ views::ViewModelBase* view_model_;
// x-coordinate normal tabs start at.
int x_;

Powered by Google App Engine
This is Rietveld 408576698