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

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

Issue 11371003: app_list: Add sync animation. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix missed init Created 8 years, 1 month 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 | Annotate | Revision Log
« no previous file with comments | « ui/app_list/apps_grid_view_unittest.cc ('k') | ui/app_list/pulsing_block_view.h » ('j') | 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/contents_view.h" 5 #include "ui/app_list/contents_view.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "ui/app_list/app_list_view.h" 9 #include "ui/app_list/app_list_view.h"
10 #include "ui/app_list/apps_grid_view.h" 10 #include "ui/app_list/apps_grid_view.h"
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
67 app_list_view); 67 app_list_view);
68 AddChildView(search_results_view); 68 AddChildView(search_results_view);
69 view_model_->Add(search_results_view, kIndexSearchResults); 69 view_model_->Add(search_results_view, kIndexSearchResults);
70 } 70 }
71 71
72 ContentsView::~ContentsView() { 72 ContentsView::~ContentsView() {
73 } 73 }
74 74
75 void ContentsView::SetModel(AppListModel* model) { 75 void ContentsView::SetModel(AppListModel* model) {
76 if (model) { 76 if (model) {
77 GetAppsGridView(view_model_.get())->SetModel(model->apps()); 77 GetAppsGridView(view_model_.get())->SetModel(model);
78 GetSearchResultListView(view_model_.get())->SetResults(model->results()); 78 GetSearchResultListView(view_model_.get())->SetResults(model->results());
79 } else { 79 } else {
80 GetAppsGridView(view_model_.get())->SetModel(NULL); 80 GetAppsGridView(view_model_.get())->SetModel(NULL);
81 GetSearchResultListView(view_model_.get())->SetResults(NULL); 81 GetSearchResultListView(view_model_.get())->SetResults(NULL);
82 } 82 }
83 } 83 }
84 84
85 void ContentsView::SetShowState(ShowState show_state) { 85 void ContentsView::SetShowState(ShowState show_state) {
86 if (show_state_ == show_state) 86 if (show_state_ == show_state)
87 return; 87 return;
(...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after
226 pagination_model_->SelectPageRelative(event->x_offset() > 0 ? -1 : 1, 226 pagination_model_->SelectPageRelative(event->x_offset() > 0 ? -1 : 1,
227 true); 227 true);
228 } 228 }
229 return ui::ER_HANDLED; 229 return ui::ER_HANDLED;
230 } 230 }
231 231
232 return ui::ER_UNHANDLED; 232 return ui::ER_UNHANDLED;
233 } 233 }
234 234
235 } // namespace app_list 235 } // namespace app_list
OLDNEW
« no previous file with comments | « ui/app_list/apps_grid_view_unittest.cc ('k') | ui/app_list/pulsing_block_view.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698