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 #include <vector> | 6 #include <vector> |
7 | 7 |
8 #include "ash/session/session_state_delegate.h" | 8 #include "ash/session/session_state_delegate.h" |
9 #include "ash/shell.h" | 9 #include "ash/shell.h" |
10 #include "ash/shell/example_factory.h" | 10 #include "ash/shell/example_factory.h" |
(...skipping 179 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
190 | 190 |
191 private: | 191 private: |
192 WindowTypeShelfItem::Type type_; | 192 WindowTypeShelfItem::Type type_; |
193 | 193 |
194 DISALLOW_COPY_AND_ASSIGN(ExampleSearchResult); | 194 DISALLOW_COPY_AND_ASSIGN(ExampleSearchResult); |
195 }; | 195 }; |
196 | 196 |
197 class ExampleAppListViewDelegate : public app_list::AppListViewDelegate { | 197 class ExampleAppListViewDelegate : public app_list::AppListViewDelegate { |
198 public: | 198 public: |
199 ExampleAppListViewDelegate() | 199 ExampleAppListViewDelegate() |
200 : model_(new app_list::AppListModel), | 200 : model_(new app_list::AppListModel) { |
201 speech_ui_(app_list::SPEECH_RECOGNITION_OFF) { | |
202 PopulateApps(); | 201 PopulateApps(); |
203 DecorateSearchBox(model_->search_box()); | 202 DecorateSearchBox(model_->search_box()); |
204 } | 203 } |
205 | 204 |
206 private: | 205 private: |
207 void PopulateApps() { | 206 void PopulateApps() { |
208 for (int i = 0; i < static_cast<int>(WindowTypeShelfItem::LAST_TYPE); ++i) { | 207 for (int i = 0; i < static_cast<int>(WindowTypeShelfItem::LAST_TYPE); ++i) { |
209 WindowTypeShelfItem::Type type = | 208 WindowTypeShelfItem::Type type = |
210 static_cast<WindowTypeShelfItem::Type>(i); | 209 static_cast<WindowTypeShelfItem::Type>(i); |
211 std::string id = base::StringPrintf("%d", i); | 210 std::string id = base::StringPrintf("%d", i); |
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
370 }; | 369 }; |
371 | 370 |
372 } // namespace | 371 } // namespace |
373 | 372 |
374 app_list::AppListViewDelegate* CreateAppListViewDelegate() { | 373 app_list::AppListViewDelegate* CreateAppListViewDelegate() { |
375 return new ExampleAppListViewDelegate; | 374 return new ExampleAppListViewDelegate; |
376 } | 375 } |
377 | 376 |
378 } // namespace shell | 377 } // namespace shell |
379 } // namespace ash | 378 } // namespace ash |
OLD | NEW |