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 <string> | 5 #include <string> |
6 | 6 |
7 #include "ash/shell.h" | 7 #include "ash/shell.h" |
8 #include "ash/shell/example_factory.h" | 8 #include "ash/shell/example_factory.h" |
9 #include "ash/shell/toplevel_window.h" | 9 #include "ash/shell/toplevel_window.h" |
10 #include "ash/shell_delegate.h" | 10 #include "ash/shell_delegate.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
218 search_box_model->SetHintText(ASCIIToUTF16("Type to search...")); | 218 search_box_model->SetHintText(ASCIIToUTF16("Type to search...")); |
219 } | 219 } |
220 | 220 |
221 // Overridden from ash::AppListViewDelegate: | 221 // Overridden from ash::AppListViewDelegate: |
222 virtual void SetModel(app_list::AppListModel* model) OVERRIDE { | 222 virtual void SetModel(app_list::AppListModel* model) OVERRIDE { |
223 model_ = model; | 223 model_ = model; |
224 PopulateApps(model_->apps()); | 224 PopulateApps(model_->apps()); |
225 DecorateSearchBox(model_->search_box()); | 225 DecorateSearchBox(model_->search_box()); |
226 } | 226 } |
227 | 227 |
228 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE { | |
229 return NULL; | |
230 } | |
231 | |
232 virtual void ActivateAppListItem(app_list::AppListItemModel* item, | 228 virtual void ActivateAppListItem(app_list::AppListItemModel* item, |
233 int event_flags) OVERRIDE { | 229 int event_flags) OVERRIDE { |
234 static_cast<WindowTypeLauncherItem*>(item)->Activate(event_flags); | 230 static_cast<WindowTypeLauncherItem*>(item)->Activate(event_flags); |
235 } | 231 } |
236 | 232 |
237 virtual void OpenSearchResult(const app_list::SearchResult& result, | 233 virtual void OpenSearchResult(const app_list::SearchResult& result, |
238 int event_flags) OVERRIDE { | 234 int event_flags) OVERRIDE { |
239 const ExampleSearchResult* example_result = | 235 const ExampleSearchResult* example_result = |
240 static_cast<const ExampleSearchResult*>(&result); | 236 static_cast<const ExampleSearchResult*>(&result); |
241 WindowTypeLauncherItem::Activate(example_result->type(), event_flags); | 237 WindowTypeLauncherItem::Activate(example_result->type(), event_flags); |
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
294 }; | 290 }; |
295 | 291 |
296 } // namespace | 292 } // namespace |
297 | 293 |
298 app_list::AppListViewDelegate* CreateAppListViewDelegate() { | 294 app_list::AppListViewDelegate* CreateAppListViewDelegate() { |
299 return new ExampleAppListViewDelegate; | 295 return new ExampleAppListViewDelegate; |
300 } | 296 } |
301 | 297 |
302 } // namespace shell | 298 } // namespace shell |
303 } // namespace ash | 299 } // namespace ash |
OLD | NEW |