| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "athena/home/app_list_view_delegate.h" | 5 #include "athena/home/app_list_view_delegate.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "athena/home/public/app_model_builder.h" | 10 #include "athena/home/public/app_model_builder.h" |
| (...skipping 10 matching lines...) Expand all Loading... |
| 21 #include "ui/app_list/speech_ui_model.h" | 21 #include "ui/app_list/speech_ui_model.h" |
| 22 #include "ui/base/resource/resource_bundle.h" | 22 #include "ui/base/resource/resource_bundle.h" |
| 23 #include "ui/gfx/image/image_skia.h" | 23 #include "ui/gfx/image/image_skia.h" |
| 24 #include "ui/resources/grit/ui_resources.h" | 24 #include "ui/resources/grit/ui_resources.h" |
| 25 #include "ui/views/controls/image_view.h" | 25 #include "ui/views/controls/image_view.h" |
| 26 | 26 |
| 27 namespace athena { | 27 namespace athena { |
| 28 | 28 |
| 29 AppListViewDelegate::AppListViewDelegate(AppModelBuilder* model_builder) | 29 AppListViewDelegate::AppListViewDelegate(AppModelBuilder* model_builder) |
| 30 : model_(new app_list::AppListModel), | 30 : model_(new app_list::AppListModel), |
| 31 speech_ui_(new app_list::SpeechUIModel( | 31 speech_ui_(new app_list::SpeechUIModel) { |
| 32 app_list::SPEECH_RECOGNITION_OFF)) { | |
| 33 model_builder->PopulateApps(model_.get()); | 32 model_builder->PopulateApps(model_.get()); |
| 34 // TODO(mukai): get the text from the resources. | 33 // TODO(mukai): get the text from the resources. |
| 35 model_->search_box()->SetHintText(base::ASCIIToUTF16("Search")); | 34 model_->search_box()->SetHintText(base::ASCIIToUTF16("Search")); |
| 36 } | 35 } |
| 37 | 36 |
| 38 AppListViewDelegate::~AppListViewDelegate() { | 37 AppListViewDelegate::~AppListViewDelegate() { |
| 39 for (size_t i = 0; i < search_providers_.size(); ++i) | 38 for (size_t i = 0; i < search_providers_.size(); ++i) |
| 40 search_providers_[i]->set_result_changed_callback(base::Closure()); | 39 search_providers_[i]->set_result_changed_callback(base::Closure()); |
| 41 } | 40 } |
| 42 | 41 |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 181 const app_list::AppListViewDelegate::Users& | 180 const app_list::AppListViewDelegate::Users& |
| 182 AppListViewDelegate::GetUsers() const { | 181 AppListViewDelegate::GetUsers() const { |
| 183 return users_; | 182 return users_; |
| 184 } | 183 } |
| 185 | 184 |
| 186 bool AppListViewDelegate::ShouldCenterWindow() const { | 185 bool AppListViewDelegate::ShouldCenterWindow() const { |
| 187 return true; | 186 return true; |
| 188 } | 187 } |
| 189 | 188 |
| 190 } // namespace athena | 189 } // namespace athena |
| OLD | NEW |