| OLD | NEW |
| 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/app_list/views/contents_view.h" | 5 #include "ui/app_list/views/contents_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/logging.h" | 10 #include "base/logging.h" |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 #include "ui/views/view_model.h" | 24 #include "ui/views/view_model.h" |
| 25 #include "ui/views/view_model_utils.h" | 25 #include "ui/views/view_model_utils.h" |
| 26 | 26 |
| 27 namespace app_list { | 27 namespace app_list { |
| 28 | 28 |
| 29 ContentsView::ContentsView(AppListMainView* app_list_main_view) | 29 ContentsView::ContentsView(AppListMainView* app_list_main_view) |
| 30 : search_results_view_(NULL), | 30 : search_results_view_(NULL), |
| 31 start_page_view_(NULL), | 31 start_page_view_(NULL), |
| 32 app_list_main_view_(app_list_main_view), | 32 app_list_main_view_(app_list_main_view), |
| 33 contents_switcher_view_(NULL), | 33 contents_switcher_view_(NULL), |
| 34 view_model_(new views::ViewModel), | 34 view_model_(new views::ViewModel<views::View>), |
| 35 page_before_search_(0) { | 35 page_before_search_(0) { |
| 36 pagination_model_.SetTransitionDurations(kPageTransitionDurationInMs, | 36 pagination_model_.SetTransitionDurations(kPageTransitionDurationInMs, |
| 37 kOverscrollPageTransitionDurationMs); | 37 kOverscrollPageTransitionDurationMs); |
| 38 pagination_model_.AddObserver(this); | 38 pagination_model_.AddObserver(this); |
| 39 } | 39 } |
| 40 | 40 |
| 41 ContentsView::~ContentsView() { | 41 ContentsView::~ContentsView() { |
| 42 pagination_model_.RemoveObserver(this); | 42 pagination_model_.RemoveObserver(this); |
| 43 if (contents_switcher_view_) | 43 if (contents_switcher_view_) |
| 44 pagination_model_.RemoveObserver(contents_switcher_view_); | 44 pagination_model_.RemoveObserver(contents_switcher_view_); |
| (...skipping 264 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 309 } | 309 } |
| 310 | 310 |
| 311 void ContentsView::TransitionStarted() { | 311 void ContentsView::TransitionStarted() { |
| 312 } | 312 } |
| 313 | 313 |
| 314 void ContentsView::TransitionChanged() { | 314 void ContentsView::TransitionChanged() { |
| 315 UpdatePageBounds(); | 315 UpdatePageBounds(); |
| 316 } | 316 } |
| 317 | 317 |
| 318 } // namespace app_list | 318 } // namespace app_list |
| OLD | NEW |