summaryrefslogtreecommitdiffstats
path: root/ui/views/view_model.cc
Commit message (Collapse)AuthorAgeFilesLines
* Switch to standard integer types in ui/views/.avi2015-12-231-0/+2
| | | | | | | | | BUG=138542 TBR=sky@chromium.org Review URL: https://codereview.chromium.org/1543173002 Cr-Commit-Position: refs/heads/master@{#366723}
* Added views::ViewModelT<T>, a type-safe template version of ViewModel.mgiuca2014-10-031-17/+17
| | | | | | | | | | | | | | | | | | A common use of views::ViewModel is to call view_at() then static_cast down to the correct type, which is unsafe. ViewModel clients are now encouraged to use ViewModelT<T> for compile-time type-checked access to the views inside. ViewModel still exists for clients that don't care about the view type, or with more complex downcasting logic. Updated clients, where possible, to use ViewModelT: TabStrip: ViewModelT<Tab> AppsGridView: ViewModelT<AppListItemView>, ViewModelT<PulsingBlockView>. BUG=418461 Review URL: https://codereview.chromium.org/598013003 Cr-Commit-Position: refs/heads/master@{#297979}
* app_list: Fix possible out of bounds index.xiyuan@chromium.org2014-05-281-0/+5
| | | | | | | | | | | | | | | | | | - Fix a problem that could not drop at the last position when dragging an item out of a folder; - Fix a case view_model_.Move is called with an out of range target index when dragging the last item out of folder; - Add a test for dragging last item and drop it at last slot; - Speculative fix to protect using an index from data model to modify view_model_; - A few more DCHECKs to catch the out-of-bound case; BUG=370064 TEST=AppListMainViewTest.DragLastItemFromFolderAndDropAtLastSlot Review URL: https://codereview.chromium.org/298963004 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@273151 0039d316-1c4b-4281-b951-d872f2087c98
* Removes debugging code added to track crashsky@chromium.org2013-10-191-2/+2
| | | | | | | | | | | | | Crash is the result of bad hook. BUG=294353 TEST=none R=ben@chromium.org TBR=ben@chromium.org Review URL: https://codereview.chromium.org/28553009 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@229580 0039d316-1c4b-4281-b951-d872f2087c98
* Adds some debugging to figure out if TabStrip is being passed invalid indexsky@chromium.org2013-10-011-2/+2
| | | | | | | | | | | | | Syzy says we're accessing beyond the size of TabStrip::tabs_. This adds some code in hopes of isolating that. BUG=294353 TEST=none R=ben@chromium.org Review URL: https://codereview.chromium.org/25021007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@226247 0039d316-1c4b-4281-b951-d872f2087c98
* Gets tab dragging to work in touch mode.sky@chromium.org2012-05-011-0/+16
| | | | | | | | | BUG=123274 TEST=none Review URL: https://chromiumcodereview.appspot.com/10267023 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@134764 0039d316-1c4b-4281-b951-d872f2087c98
* Attempt 3 at a better touch tabstrip. There is still a bunch to do,sky@chromium.org2012-04-251-0/+3
| | | | | | | | | | | | but this gets things in a better state. BUG=123274 TEST=covered by unit tests. R=ben@chromium.org Review URL: https://chromiumcodereview.appspot.com/10213011 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@133930 0039d316-1c4b-4281-b951-d872f2087c98
* Moves view_model and related classes to views. This way I can use itsky@chromium.org2012-04-091-0/+55
in the tabstrip. BUG=none TEST=none Review URL: https://chromiumcodereview.appspot.com/10031012 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@131472 0039d316-1c4b-4281-b951-d872f2087c98