| 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" |
| (...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 215 | 215 |
| 216 return gfx::ImageSkia(canvas.ExtractImageRep()); | 216 return gfx::ImageSkia(canvas.ExtractImageRep()); |
| 217 } | 217 } |
| 218 | 218 |
| 219 void DecorateSearchBox(app_list::SearchBoxModel* search_box_model) { | 219 void DecorateSearchBox(app_list::SearchBoxModel* search_box_model) { |
| 220 search_box_model->SetIcon(CreateSearchBoxIcon()); | 220 search_box_model->SetIcon(CreateSearchBoxIcon()); |
| 221 search_box_model->SetHintText(ASCIIToUTF16("Type to search...")); | 221 search_box_model->SetHintText(ASCIIToUTF16("Type to search...")); |
| 222 } | 222 } |
| 223 | 223 |
| 224 // Overridden from ash::AppListViewDelegate: | 224 // Overridden from ash::AppListViewDelegate: |
| 225 virtual void SetModel(app_list::AppListModel* model) OVERRIDE { | 225 virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE { |
| 226 // Nothing needs to be done. |
| 227 } |
| 228 |
| 229 virtual void InitModel(app_list::AppListModel* model) OVERRIDE { |
| 226 model_ = model; | 230 model_ = model; |
| 227 PopulateApps(model_->apps()); | 231 PopulateApps(model_->apps()); |
| 228 DecorateSearchBox(model_->search_box()); | 232 DecorateSearchBox(model_->search_box()); |
| 229 } | 233 } |
| 230 | 234 |
| 231 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE { | 235 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE { |
| 232 return NULL; | 236 return NULL; |
| 233 } | 237 } |
| 234 | 238 |
| 235 virtual void GetShortcutPathForApp( | 239 virtual void GetShortcutPathForApp( |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 302 } | 306 } |
| 303 | 307 |
| 304 virtual void OpenHelp() OVERRIDE { | 308 virtual void OpenHelp() OVERRIDE { |
| 305 // Nothing needs to be done. | 309 // Nothing needs to be done. |
| 306 } | 310 } |
| 307 | 311 |
| 308 virtual void OpenFeedback() OVERRIDE { | 312 virtual void OpenFeedback() OVERRIDE { |
| 309 // Nothing needs to be done. | 313 // Nothing needs to be done. |
| 310 } | 314 } |
| 311 | 315 |
| 316 virtual void ShowForProfileByPath( |
| 317 const base::FilePath& profile_path) OVERRIDE { |
| 318 // Nothing needs to be done. |
| 319 } |
| 320 |
| 312 app_list::AppListModel* model_; | 321 app_list::AppListModel* model_; |
| 313 | 322 |
| 314 DISALLOW_COPY_AND_ASSIGN(ExampleAppListViewDelegate); | 323 DISALLOW_COPY_AND_ASSIGN(ExampleAppListViewDelegate); |
| 315 }; | 324 }; |
| 316 | 325 |
| 317 } // namespace | 326 } // namespace |
| 318 | 327 |
| 319 app_list::AppListViewDelegate* CreateAppListViewDelegate() { | 328 app_list::AppListViewDelegate* CreateAppListViewDelegate() { |
| 320 return new ExampleAppListViewDelegate; | 329 return new ExampleAppListViewDelegate; |
| 321 } | 330 } |
| 322 | 331 |
| 323 } // namespace shell | 332 } // namespace shell |
| 324 } // namespace ash | 333 } // namespace ash |
| OLD | NEW |