| 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 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 namespace app_list { | 26 namespace app_list { |
| 27 | 27 |
| 28 ContentsView::ContentsView(AppListMainView* app_list_main_view) | 28 ContentsView::ContentsView(AppListMainView* app_list_main_view) |
| 29 : search_results_view_(NULL), | 29 : search_results_view_(NULL), |
| 30 start_page_view_(NULL), | 30 start_page_view_(NULL), |
| 31 app_list_main_view_(app_list_main_view), | 31 app_list_main_view_(app_list_main_view), |
| 32 contents_switcher_view_(NULL), | 32 contents_switcher_view_(NULL), |
| 33 view_model_(new views::ViewModel), | 33 view_model_(new views::ViewModel), |
| 34 page_before_search_(0) { | 34 page_before_search_(0) { |
| 35 pagination_model_.SetTransitionDurations(kPageTransitionDurationInMs, |
| 36 kOverscrollPageTransitionDurationMs); |
| 35 pagination_model_.AddObserver(this); | 37 pagination_model_.AddObserver(this); |
| 36 } | 38 } |
| 37 | 39 |
| 38 ContentsView::~ContentsView() { | 40 ContentsView::~ContentsView() { |
| 39 pagination_model_.RemoveObserver(this); | 41 pagination_model_.RemoveObserver(this); |
| 40 if (contents_switcher_view_) | 42 if (contents_switcher_view_) |
| 41 pagination_model_.RemoveObserver(contents_switcher_view_); | 43 pagination_model_.RemoveObserver(contents_switcher_view_); |
| 42 } | 44 } |
| 43 | 45 |
| 44 void ContentsView::InitNamedPages(AppListModel* model, | 46 void ContentsView::InitNamedPages(AppListModel* model, |
| (...skipping 256 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 301 } | 303 } |
| 302 | 304 |
| 303 void ContentsView::TransitionStarted() { | 305 void ContentsView::TransitionStarted() { |
| 304 } | 306 } |
| 305 | 307 |
| 306 void ContentsView::TransitionChanged() { | 308 void ContentsView::TransitionChanged() { |
| 307 UpdatePageBounds(); | 309 UpdatePageBounds(); |
| 308 } | 310 } |
| 309 | 311 |
| 310 } // namespace app_list | 312 } // namespace app_list |
| OLD | NEW |