| 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 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 105 } | 105 } |
| 106 | 106 |
| 107 void AppListMainView::AddContentsViews() { | 107 void AppListMainView::AddContentsViews() { |
| 108 DCHECK(search_box_view_); | 108 DCHECK(search_box_view_); |
| 109 | 109 |
| 110 contents_view_ = new ContentsView(this); | 110 contents_view_ = new ContentsView(this); |
| 111 if (app_list::switches::IsExperimentalAppListEnabled()) { | 111 if (app_list::switches::IsExperimentalAppListEnabled()) { |
| 112 contents_switcher_view_ = new ContentsSwitcherView(contents_view_); | 112 contents_switcher_view_ = new ContentsSwitcherView(contents_view_); |
| 113 contents_view_->SetContentsSwitcherView(contents_switcher_view_); | 113 contents_view_->SetContentsSwitcherView(contents_switcher_view_); |
| 114 } | 114 } |
| 115 contents_view_->Init(model_, delegate_); | 115 contents_view_->Init(model_); |
| 116 AddChildView(contents_view_); | 116 AddChildView(contents_view_); |
| 117 if (contents_switcher_view_) | 117 if (contents_switcher_view_) |
| 118 AddChildView(contents_switcher_view_); | 118 AddChildView(contents_switcher_view_); |
| 119 | 119 |
| 120 search_box_view_->set_contents_view(contents_view_); | 120 search_box_view_->set_contents_view(contents_view_); |
| 121 UpdateSearchBoxVisibility(); | 121 UpdateSearchBoxVisibility(); |
| 122 | 122 |
| 123 contents_view_->SetPaintToLayer(true); | 123 contents_view_->SetPaintToLayer(true); |
| 124 contents_view_->SetFillsBoundsOpaquely(false); | 124 contents_view_->SetFillsBoundsOpaquely(false); |
| 125 contents_view_->layer()->SetMasksToBounds(true); | 125 contents_view_->layer()->SetMasksToBounds(true); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 // Resubmit the query via a posted task so that all observers for the | 302 // Resubmit the query via a posted task so that all observers for the |
| 303 // uninstall notification are notified. | 303 // uninstall notification are notified. |
| 304 base::MessageLoop::current()->PostTask( | 304 base::MessageLoop::current()->PostTask( |
| 305 FROM_HERE, | 305 FROM_HERE, |
| 306 base::Bind(&AppListMainView::QueryChanged, | 306 base::Bind(&AppListMainView::QueryChanged, |
| 307 weak_ptr_factory_.GetWeakPtr(), | 307 weak_ptr_factory_.GetWeakPtr(), |
| 308 search_box_view_)); | 308 search_box_view_)); |
| 309 } | 309 } |
| 310 | 310 |
| 311 } // namespace app_list | 311 } // namespace app_list |
| OLD | NEW |