| 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 214 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 225 void DecorateSearchBox(app_list::SearchBoxModel* search_box_model) { | 225 void DecorateSearchBox(app_list::SearchBoxModel* search_box_model) { |
| 226 search_box_model->SetIcon(CreateSearchBoxIcon()); | 226 search_box_model->SetIcon(CreateSearchBoxIcon()); |
| 227 search_box_model->SetHintText(ASCIIToUTF16("Type to search...")); | 227 search_box_model->SetHintText(ASCIIToUTF16("Type to search...")); |
| 228 } | 228 } |
| 229 | 229 |
| 230 // Overridden from ash::AppListViewDelegate: | 230 // Overridden from ash::AppListViewDelegate: |
| 231 virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE { | 231 virtual void SetProfileByPath(const base::FilePath& profile_path) OVERRIDE { |
| 232 // Nothing needs to be done. | 232 // Nothing needs to be done. |
| 233 } | 233 } |
| 234 | 234 |
| 235 virtual const Users& GetUsers() const OVERRIDE { |
| 236 return users_; |
| 237 } |
| 238 |
| 235 virtual void InitModel(app_list::AppListModel* model) OVERRIDE { | 239 virtual void InitModel(app_list::AppListModel* model) OVERRIDE { |
| 236 model_ = model; | 240 model_ = model; |
| 237 PopulateApps(model_->item_list()); | 241 PopulateApps(model_->item_list()); |
| 238 DecorateSearchBox(model_->search_box()); | 242 DecorateSearchBox(model_->search_box()); |
| 239 } | 243 } |
| 240 | 244 |
| 241 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE { | 245 virtual app_list::SigninDelegate* GetSigninDelegate() OVERRIDE { |
| 242 return NULL; | 246 return NULL; |
| 243 } | 247 } |
| 244 | 248 |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 317 virtual void ShowForProfileByPath( | 321 virtual void ShowForProfileByPath( |
| 318 const base::FilePath& profile_path) OVERRIDE { | 322 const base::FilePath& profile_path) OVERRIDE { |
| 319 // Nothing needs to be done. | 323 // Nothing needs to be done. |
| 320 } | 324 } |
| 321 | 325 |
| 322 virtual content::WebContents* GetStartPageContents() OVERRIDE { | 326 virtual content::WebContents* GetStartPageContents() OVERRIDE { |
| 323 return NULL; | 327 return NULL; |
| 324 } | 328 } |
| 325 | 329 |
| 326 app_list::AppListModel* model_; | 330 app_list::AppListModel* model_; |
| 331 Users users_; |
| 327 | 332 |
| 328 DISALLOW_COPY_AND_ASSIGN(ExampleAppListViewDelegate); | 333 DISALLOW_COPY_AND_ASSIGN(ExampleAppListViewDelegate); |
| 329 }; | 334 }; |
| 330 | 335 |
| 331 } // namespace | 336 } // namespace |
| 332 | 337 |
| 333 app_list::AppListViewDelegate* CreateAppListViewDelegate() { | 338 app_list::AppListViewDelegate* CreateAppListViewDelegate() { |
| 334 return new ExampleAppListViewDelegate; | 339 return new ExampleAppListViewDelegate; |
| 335 } | 340 } |
| 336 | 341 |
| 337 } // namespace shell | 342 } // namespace shell |
| 338 } // namespace ash | 343 } // namespace ash |
| OLD | NEW |