| 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 "chrome/browser/ui/ash/chrome_shell_delegate.h" | 5 #include "chrome/browser/ui/ash/chrome_shell_delegate.h" |
| 6 | 6 |
| 7 #include "ash/host/root_window_host_factory.h" | 7 #include "ash/host/root_window_host_factory.h" |
| 8 #include "ash/launcher/launcher_types.h" | 8 #include "ash/launcher/launcher_types.h" |
| 9 #include "ash/magnifier/magnifier_constants.h" | 9 #include "ash/magnifier/magnifier_constants.h" |
| 10 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
| (...skipping 395 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 406 #else | 406 #else |
| 407 return false; | 407 return false; |
| 408 #endif | 408 #endif |
| 409 } | 409 } |
| 410 | 410 |
| 411 app_list::AppListViewDelegate* | 411 app_list::AppListViewDelegate* |
| 412 ChromeShellDelegate::CreateAppListViewDelegate() { | 412 ChromeShellDelegate::CreateAppListViewDelegate() { |
| 413 DCHECK(ash::Shell::HasInstance()); | 413 DCHECK(ash::Shell::HasInstance()); |
| 414 // Shell will own the created delegate, and the delegate will own | 414 // Shell will own the created delegate, and the delegate will own |
| 415 // the controller. | 415 // the controller. |
| 416 return new AppListViewDelegate(new AppListControllerDelegateAsh()); | 416 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); |
| 417 return new AppListViewDelegate(new AppListControllerDelegateAsh(), profile); |
| 417 } | 418 } |
| 418 | 419 |
| 419 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( | 420 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( |
| 420 ash::LauncherModel* model) { | 421 ash::LauncherModel* model) { |
| 421 // TODO(oshima): This is currently broken with multiple launchers. | 422 // TODO(oshima): This is currently broken with multiple launchers. |
| 422 // Refactor so that there is just one launcher delegate in the | 423 // Refactor so that there is just one launcher delegate in the |
| 423 // shell. | 424 // shell. |
| 424 if (!launcher_delegate_) { | 425 if (!launcher_delegate_) { |
| 425 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); | 426 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); |
| 426 launcher_delegate_->Init(); | 427 launcher_delegate_->Init(); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 603 ash::Shell::GetInstance()->ShowLauncher(); | 604 ash::Shell::GetInstance()->ShowLauncher(); |
| 604 break; | 605 break; |
| 605 default: | 606 default: |
| 606 NOTREACHED() << "Unexpected notification " << type; | 607 NOTREACHED() << "Unexpected notification " << type; |
| 607 } | 608 } |
| 608 #else | 609 #else |
| 609 // MSVC++ warns about switch statements without any cases. | 610 // MSVC++ warns about switch statements without any cases. |
| 610 NOTREACHED() << "Unexpected notification " << type; | 611 NOTREACHED() << "Unexpected notification " << type; |
| 611 #endif | 612 #endif |
| 612 } | 613 } |
| OLD | NEW |