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/session_state_delegate.h" | 7 #include "ash/session_state_delegate.h" |
8 #include "ash/shell.h" | 8 #include "ash/shell.h" |
9 #include "ash/shell/example_factory.h" | 9 #include "ash/shell/example_factory.h" |
10 #include "ash/shell/toplevel_window.h" | 10 #include "ash/shell/toplevel_window.h" |
11 #include "base/basictypes.h" | 11 #include "base/basictypes.h" |
| 12 #include "base/callback.h" |
| 13 #include "base/files/file_path.h" |
12 #include "base/i18n/case_conversion.h" | 14 #include "base/i18n/case_conversion.h" |
13 #include "base/i18n/string_search.h" | 15 #include "base/i18n/string_search.h" |
14 #include "base/strings/string_util.h" | 16 #include "base/strings/string_util.h" |
15 #include "base/strings/utf_string_conversions.h" | 17 #include "base/strings/utf_string_conversions.h" |
16 #include "ui/app_list/app_list_item_model.h" | 18 #include "ui/app_list/app_list_item_model.h" |
17 #include "ui/app_list/app_list_model.h" | 19 #include "ui/app_list/app_list_model.h" |
18 #include "ui/app_list/app_list_view_delegate.h" | 20 #include "ui/app_list/app_list_view_delegate.h" |
19 #include "ui/app_list/search_box_model.h" | 21 #include "ui/app_list/search_box_model.h" |
20 #include "ui/app_list/search_result.h" | 22 #include "ui/app_list/search_result.h" |
21 #include "ui/gfx/canvas.h" | 23 #include "ui/gfx/canvas.h" |
(...skipping 202 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
224 virtual void SetModel(app_list::AppListModel* model) OVERRIDE { | 226 virtual void SetModel(app_list::AppListModel* model) OVERRIDE { |
225 model_ = model; | 227 model_ = model; |
226 PopulateApps(model_->apps()); | 228 PopulateApps(model_->apps()); |
227 DecorateSearchBox(model_->search_box()); | 229 DecorateSearchBox(model_->search_box()); |
228 } | 230 } |
229 | 231 |
230 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE { | 232 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE { |
231 return NULL; | 233 return NULL; |
232 } | 234 } |
233 | 235 |
| 236 virtual void GetShortcutPathForApp( |
| 237 const std::string& app_id, |
| 238 const base::Callback<void(const base::FilePath&)>& callback) OVERRIDE { |
| 239 } |
| 240 |
234 virtual void ActivateAppListItem(app_list::AppListItemModel* item, | 241 virtual void ActivateAppListItem(app_list::AppListItemModel* item, |
235 int event_flags) OVERRIDE { | 242 int event_flags) OVERRIDE { |
236 static_cast<WindowTypeLauncherItem*>(item)->Activate(event_flags); | 243 static_cast<WindowTypeLauncherItem*>(item)->Activate(event_flags); |
237 } | 244 } |
238 | 245 |
239 virtual void OpenSearchResult(app_list::SearchResult* result, | 246 virtual void OpenSearchResult(app_list::SearchResult* result, |
240 int event_flags) OVERRIDE { | 247 int event_flags) OVERRIDE { |
241 const ExampleSearchResult* example_result = | 248 const ExampleSearchResult* example_result = |
242 static_cast<const ExampleSearchResult*>(result); | 249 static_cast<const ExampleSearchResult*>(result); |
243 WindowTypeLauncherItem::Activate(example_result->type(), event_flags); | 250 WindowTypeLauncherItem::Activate(example_result->type(), event_flags); |
(...skipping 77 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
321 }; | 328 }; |
322 | 329 |
323 } // namespace | 330 } // namespace |
324 | 331 |
325 app_list::AppListViewDelegate* CreateAppListViewDelegate() { | 332 app_list::AppListViewDelegate* CreateAppListViewDelegate() { |
326 return new ExampleAppListViewDelegate; | 333 return new ExampleAppListViewDelegate; |
327 } | 334 } |
328 | 335 |
329 } // namespace shell | 336 } // namespace shell |
330 } // namespace ash | 337 } // namespace ash |
OLD | NEW |