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 | 8 |
9 #include "base/logging.h" | 9 #include "base/logging.h" |
10 #include "ui/app_list/app_list_constants.h" | 10 #include "ui/app_list/app_list_constants.h" |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 new AppsContainerView(app_list_main_view, pagination_model, model); | 71 new AppsContainerView(app_list_main_view, pagination_model, model); |
72 AddChildView(apps_container_view_); | 72 AddChildView(apps_container_view_); |
73 view_model_->Add(apps_container_view_, kIndexAppsContainer); | 73 view_model_->Add(apps_container_view_, kIndexAppsContainer); |
74 | 74 |
75 SearchResultListView* search_results_view = new SearchResultListView( | 75 SearchResultListView* search_results_view = new SearchResultListView( |
76 app_list_main_view, view_delegate); | 76 app_list_main_view, view_delegate); |
77 AddChildView(search_results_view); | 77 AddChildView(search_results_view); |
78 view_model_->Add(search_results_view, kIndexSearchResults); | 78 view_model_->Add(search_results_view, kIndexSearchResults); |
79 | 79 |
80 if (app_list::switches::IsExperimentalAppListEnabled()) { | 80 if (app_list::switches::IsExperimentalAppListEnabled()) { |
81 content::WebContents* start_page_contents = | 81 start_page_view_ = new StartPageView(app_list_main_view, view_delegate); |
82 view_delegate->GetStartPageContents(); | |
83 start_page_view_ = | |
84 new StartPageView(app_list_main_view, start_page_contents); | |
85 AddChildView(start_page_view_); | 82 AddChildView(start_page_view_); |
86 view_model_->Add(start_page_view_, kIndexStartPage); | 83 view_model_->Add(start_page_view_, kIndexStartPage); |
87 } | 84 } |
88 | 85 |
89 GetSearchResultListView(view_model_.get())->SetResults(model->results()); | 86 GetSearchResultListView(view_model_.get())->SetResults(model->results()); |
90 } | 87 } |
91 | 88 |
92 ContentsView::~ContentsView() { | 89 ContentsView::~ContentsView() { |
93 } | 90 } |
94 | 91 |
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
313 if (!pagination_model_->has_transition()) { | 310 if (!pagination_model_->has_transition()) { |
314 pagination_model_->SelectPageRelative(offset > 0 ? -1 : 1, | 311 pagination_model_->SelectPageRelative(offset > 0 ? -1 : 1, |
315 true); | 312 true); |
316 } | 313 } |
317 event->SetHandled(); | 314 event->SetHandled(); |
318 event->StopPropagation(); | 315 event->StopPropagation(); |
319 } | 316 } |
320 } | 317 } |
321 | 318 |
322 } // namespace app_list | 319 } // namespace app_list |
OLD | NEW |