| 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/test/app_list_test_view_delegate.h" | 5 #include "ui/app_list/test/app_list_test_view_delegate.h" |
| 6 | 6 |
| 7 #include <string> | 7 #include <string> |
| 8 #include <vector> | 8 #include <vector> |
| 9 | 9 |
| 10 #include "base/callback.h" | 10 #include "base/callback.h" |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 45 } | 45 } |
| 46 | 46 |
| 47 AppListModel* AppListTestViewDelegate::GetModel() { | 47 AppListModel* AppListTestViewDelegate::GetModel() { |
| 48 return model_.get(); | 48 return model_.get(); |
| 49 } | 49 } |
| 50 | 50 |
| 51 SpeechUIModel* AppListTestViewDelegate::GetSpeechUI() { | 51 SpeechUIModel* AppListTestViewDelegate::GetSpeechUI() { |
| 52 return &speech_ui_; | 52 return &speech_ui_; |
| 53 } | 53 } |
| 54 | 54 |
| 55 void AppListTestViewDelegate::GetShortcutPathForApp( | |
| 56 const std::string& app_id, | |
| 57 const base::Callback<void(const base::FilePath&)>& callback) { | |
| 58 callback.Run(base::FilePath()); | |
| 59 } | |
| 60 | |
| 61 void AppListTestViewDelegate::OpenSearchResult(SearchResult* result, | 55 void AppListTestViewDelegate::OpenSearchResult(SearchResult* result, |
| 62 bool auto_launch, | 56 bool auto_launch, |
| 63 int event_flags) { | 57 int event_flags) { |
| 64 const AppListModel::SearchResults* results = model_->results(); | 58 const AppListModel::SearchResults* results = model_->results(); |
| 65 for (size_t i = 0; i < results->item_count(); ++i) { | 59 for (size_t i = 0; i < results->item_count(); ++i) { |
| 66 if (results->GetItemAt(i) == result) { | 60 if (results->GetItemAt(i) == result) { |
| 67 open_search_result_counts_[i]++; | 61 open_search_result_counts_[i]++; |
| 68 break; | 62 break; |
| 69 } | 63 } |
| 70 } | 64 } |
| (...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 120 observers_.AddObserver(observer); | 114 observers_.AddObserver(observer); |
| 121 } | 115 } |
| 122 | 116 |
| 123 void AppListTestViewDelegate::RemoveObserver( | 117 void AppListTestViewDelegate::RemoveObserver( |
| 124 AppListViewDelegateObserver* observer) { | 118 AppListViewDelegateObserver* observer) { |
| 125 observers_.RemoveObserver(observer); | 119 observers_.RemoveObserver(observer); |
| 126 } | 120 } |
| 127 | 121 |
| 128 } // namespace test | 122 } // namespace test |
| 129 } // namespace app_list | 123 } // namespace app_list |
| OLD | NEW |