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

Unified Diff: chrome/browser/ui/views/tabs/tab_strip.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
« no previous file with comments | « chrome/browser/ui/views/tabs/stacked_tab_strip_layout.cc ('k') | ui/app_list/views/app_list_folder_view.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/views/tabs/tab_strip.h
diff --git a/chrome/browser/ui/views/tabs/tab_strip.h b/chrome/browser/ui/views/tabs/tab_strip.h
index 34cc81004881c1a3c6a2ea5f8b30ce455ca94e34..47f06dcbc40a6f9b699a34425ed21c5575b79d2a 100644
--- a/chrome/browser/ui/views/tabs/tab_strip.h
+++ b/chrome/browser/ui/views/tabs/tab_strip.h
@@ -149,9 +149,7 @@ class TabStrip : public views::View,
}
// Returns the Tab at |index|.
- Tab* tab_at(int index) const {
- return static_cast<Tab*>(tabs_.view_at(index));
- }
+ Tab* tab_at(int index) const { return tabs_.view_at(index); }
// Returns the index of the specified tab in the model coordinate system, or
// -1 if tab is closing or not valid.
@@ -596,7 +594,7 @@ class TabStrip : public views::View,
// |tabs_closing_map_|. When the animation completes the tab is removed from
// |tabs_closing_map_|. The painting code ensures both sets of tabs are
// painted, and the event handling code ensures only tabs in |tabs_| are used.
- views::ViewModel tabs_;
+ views::ViewModelT<Tab> tabs_;
TabsClosingMap tabs_closing_map_;
scoped_ptr<TabStripController> controller_;
« no previous file with comments | « chrome/browser/ui/views/tabs/stacked_tab_strip_layout.cc ('k') | ui/app_list/views/app_list_folder_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698