| 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 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 233 static_cast<WindowTypeLauncherItem*>(item)->Activate(event_flags); | 233 static_cast<WindowTypeLauncherItem*>(item)->Activate(event_flags); |
| 234 } | 234 } |
| 235 | 235 |
| 236 virtual void OpenSearchResult(const app_list::SearchResult& result, | 236 virtual void OpenSearchResult(const app_list::SearchResult& result, |
| 237 int event_flags) OVERRIDE { | 237 int event_flags) OVERRIDE { |
| 238 const ExampleSearchResult* example_result = | 238 const ExampleSearchResult* example_result = |
| 239 static_cast<const ExampleSearchResult*>(&result); | 239 static_cast<const ExampleSearchResult*>(&result); |
| 240 WindowTypeLauncherItem::Activate(example_result->type(), event_flags); | 240 WindowTypeLauncherItem::Activate(example_result->type(), event_flags); |
| 241 } | 241 } |
| 242 | 242 |
| 243 virtual void InvokeSearchResultAction(const app_list::SearchResult& result, |
| 244 int action_index, |
| 245 int event_flags) OVERRIDE { |
| 246 NOTIMPLEMENTED(); |
| 247 } |
| 248 |
| 243 virtual void StartSearch() OVERRIDE { | 249 virtual void StartSearch() OVERRIDE { |
| 244 string16 query; | 250 string16 query; |
| 245 TrimWhitespace(model_->search_box()->text(), TRIM_ALL, &query); | 251 TrimWhitespace(model_->search_box()->text(), TRIM_ALL, &query); |
| 246 query = base::i18n::ToLower(query); | 252 query = base::i18n::ToLower(query); |
| 247 | 253 |
| 248 model_->results()->DeleteAll(); | 254 model_->results()->DeleteAll(); |
| 249 if (query.empty()) | 255 if (query.empty()) |
| 250 return; | 256 return; |
| 251 | 257 |
| 252 for (int i = 0; | 258 for (int i = 0; |
| (...skipping 24 matching lines...) Expand all Loading... |
| 277 }; | 283 }; |
| 278 | 284 |
| 279 } // namespace | 285 } // namespace |
| 280 | 286 |
| 281 app_list::AppListViewDelegate* CreateAppListViewDelegate() { | 287 app_list::AppListViewDelegate* CreateAppListViewDelegate() { |
| 282 return new ExampleAppListViewDelegate; | 288 return new ExampleAppListViewDelegate; |
| 283 } | 289 } |
| 284 | 290 |
| 285 } // namespace shell | 291 } // namespace shell |
| 286 } // namespace ash | 292 } // namespace ash |
| OLD | NEW |