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

Side by Side Diff: ui/app_list/views/contents_view.cc

Issue 559853003: ContentsView pagination model honours kPageTransitionDurationInMs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698