Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(47)

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 12090062: Enable profile switching for standalone App Launcher via the Settings App. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: disable tests on aura Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 398 matching lines...) Expand 10 before | Expand all | Expand 10 after
409 #else 409 #else
410 return false; 410 return false;
411 #endif 411 #endif
412 } 412 }
413 413
414 app_list::AppListViewDelegate* 414 app_list::AppListViewDelegate*
415 ChromeShellDelegate::CreateAppListViewDelegate() { 415 ChromeShellDelegate::CreateAppListViewDelegate() {
416 DCHECK(ash::Shell::HasInstance()); 416 DCHECK(ash::Shell::HasInstance());
417 // Shell will own the created delegate, and the delegate will own 417 // Shell will own the created delegate, and the delegate will own
418 // the controller. 418 // the controller.
419 return new AppListViewDelegate(new AppListControllerDelegateAsh()); 419 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
420 return new AppListViewDelegate(new AppListControllerDelegateAsh(), profile);
420 } 421 }
421 422
422 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( 423 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate(
423 ash::LauncherModel* model) { 424 ash::LauncherModel* model) {
424 // TODO(oshima): This is currently broken with multiple launchers. 425 // TODO(oshima): This is currently broken with multiple launchers.
425 // Refactor so that there is just one launcher delegate in the 426 // Refactor so that there is just one launcher delegate in the
426 // shell. 427 // shell.
427 if (!launcher_delegate_) { 428 if (!launcher_delegate_) {
428 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); 429 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model);
429 launcher_delegate_->Init(); 430 launcher_delegate_->Init();
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
614 ash::Shell::GetInstance()->ShowLauncher(); 615 ash::Shell::GetInstance()->ShowLauncher();
615 break; 616 break;
616 default: 617 default:
617 NOTREACHED() << "Unexpected notification " << type; 618 NOTREACHED() << "Unexpected notification " << type;
618 } 619 }
619 #else 620 #else
620 // MSVC++ warns about switch statements without any cases. 621 // MSVC++ warns about switch statements without any cases.
621 NOTREACHED() << "Unexpected notification " << type; 622 NOTREACHED() << "Unexpected notification " << type;
622 #endif 623 #endif
623 } 624 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698