| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/app_list_main_view.h" | 5 #include "ui/app_list/views/app_list_main_view.h" |
| 6 | 6 |
| 7 #include <algorithm> | 7 #include <algorithm> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 109 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 | 120 |
| 121 void AppListMainView::AddContentsViews() { | 121 void AppListMainView::AddContentsViews() { |
| 122 DCHECK(search_box_view_); | 122 DCHECK(search_box_view_); |
| 123 | 123 |
| 124 contents_view_ = new ContentsView(this); | 124 contents_view_ = new ContentsView(this); |
| 125 contents_view_->Init(model_); | 125 contents_view_->Init(model_); |
| 126 AddChildView(contents_view_); | 126 AddChildView(contents_view_); |
| 127 | 127 |
| 128 search_box_view_->set_contents_view(contents_view_); | 128 search_box_view_->set_contents_view(contents_view_); |
| 129 | 129 |
| 130 contents_view_->SetPaintToLayer(true); | 130 contents_view_->SetPaintToLayer(); |
| 131 contents_view_->layer()->SetFillsBoundsOpaquely(false); | 131 contents_view_->layer()->SetFillsBoundsOpaquely(false); |
| 132 contents_view_->layer()->SetMasksToBounds(true); | 132 contents_view_->layer()->SetMasksToBounds(true); |
| 133 | 133 |
| 134 delegate_->StartSearch(); | 134 delegate_->StartSearch(); |
| 135 } | 135 } |
| 136 | 136 |
| 137 void AppListMainView::ShowAppListWhenReady() { | 137 void AppListMainView::ShowAppListWhenReady() { |
| 138 if (pending_icon_loaders_.empty()) { | 138 if (pending_icon_loaders_.empty()) { |
| 139 icon_loading_wait_timer_.Stop(); | 139 icon_loading_wait_timer_.Stop(); |
| 140 GetWidget()->Show(); | 140 GetWidget()->Show(); |
| (...skipping 171 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 312 contents_view_->search_results_page_view()->SetSelection(select); | 312 contents_view_->search_results_page_view()->SetSelection(select); |
| 313 } | 313 } |
| 314 | 314 |
| 315 void AppListMainView::OnResultInstalled(SearchResult* result) { | 315 void AppListMainView::OnResultInstalled(SearchResult* result) { |
| 316 // Clears the search to show the apps grid. The last installed app | 316 // Clears the search to show the apps grid. The last installed app |
| 317 // should be highlighted and made visible already. | 317 // should be highlighted and made visible already. |
| 318 search_box_view_->ClearSearch(); | 318 search_box_view_->ClearSearch(); |
| 319 } | 319 } |
| 320 | 320 |
| 321 } // namespace app_list | 321 } // namespace app_list |
| OLD | NEW |