| 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 396 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 407 #else | 407 #else |
| 408 return false; | 408 return false; |
| 409 #endif | 409 #endif |
| 410 } | 410 } |
| 411 | 411 |
| 412 app_list::AppListViewDelegate* | 412 app_list::AppListViewDelegate* |
| 413 ChromeShellDelegate::CreateAppListViewDelegate() { | 413 ChromeShellDelegate::CreateAppListViewDelegate() { |
| 414 DCHECK(ash::Shell::HasInstance()); | 414 DCHECK(ash::Shell::HasInstance()); |
| 415 // Shell will own the created delegate, and the delegate will own | 415 // Shell will own the created delegate, and the delegate will own |
| 416 // the controller. | 416 // the controller. |
| 417 return new AppListViewDelegate(new AppListControllerDelegateAsh()); | 417 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord(); |
| 418 return new AppListViewDelegate(new AppListControllerDelegateAsh(), profile); |
| 418 } | 419 } |
| 419 | 420 |
| 420 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( | 421 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( |
| 421 ash::LauncherModel* model) { | 422 ash::LauncherModel* model) { |
| 422 // TODO(oshima): This is currently broken with multiple launchers. | 423 // TODO(oshima): This is currently broken with multiple launchers. |
| 423 // Refactor so that there is just one launcher delegate in the | 424 // Refactor so that there is just one launcher delegate in the |
| 424 // shell. | 425 // shell. |
| 425 if (!launcher_delegate_) { | 426 if (!launcher_delegate_) { |
| 426 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); | 427 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); |
| 427 launcher_delegate_->Init(); | 428 launcher_delegate_->Init(); |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 582 ash::Shell::GetInstance()->ShowLauncher(); | 583 ash::Shell::GetInstance()->ShowLauncher(); |
| 583 break; | 584 break; |
| 584 default: | 585 default: |
| 585 NOTREACHED() << "Unexpected notification " << type; | 586 NOTREACHED() << "Unexpected notification " << type; |
| 586 } | 587 } |
| 587 #else | 588 #else |
| 588 // MSVC++ warns about switch statements without any cases. | 589 // MSVC++ warns about switch statements without any cases. |
| 589 NOTREACHED() << "Unexpected notification " << type; | 590 NOTREACHED() << "Unexpected notification " << type; |
| 590 #endif | 591 #endif |
| 591 } | 592 } |
| OLD | NEW |