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

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

Issue 11968034: Enable profile switching for standalone App Launcher via the Settings App. (Closed) Base URL: git://nomatter.syd/chromium/src.git@master
Patch Set: Created 7 years, 11 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 391 matching lines...) Expand 10 before | Expand all | Expand 10 after
402 #else 402 #else
403 return false; 403 return false;
404 #endif 404 #endif
405 } 405 }
406 406
407 app_list::AppListViewDelegate* 407 app_list::AppListViewDelegate*
408 ChromeShellDelegate::CreateAppListViewDelegate() { 408 ChromeShellDelegate::CreateAppListViewDelegate() {
409 DCHECK(ash::Shell::HasInstance()); 409 DCHECK(ash::Shell::HasInstance());
410 // Shell will own the created delegate, and the delegate will own 410 // Shell will own the created delegate, and the delegate will own
411 // the controller. 411 // the controller.
412 return new AppListViewDelegate(new AppListControllerDelegateAsh()); 412 Profile* profile = ProfileManager::GetDefaultProfileOrOffTheRecord();
413 return new AppListViewDelegate(new AppListControllerDelegateAsh(), profile);
413 } 414 }
414 415
415 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( 416 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate(
416 ash::LauncherModel* model) { 417 ash::LauncherModel* model) {
417 // TODO(oshima): This is currently broken with multiple launchers. 418 // TODO(oshima): This is currently broken with multiple launchers.
418 // Refactor so that there is just one launcher delegate in the 419 // Refactor so that there is just one launcher delegate in the
419 // shell. 420 // shell.
420 if (!launcher_delegate_) { 421 if (!launcher_delegate_) {
421 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); 422 launcher_delegate_ = ChromeLauncherController::CreateInstance(NULL, model);
422 launcher_delegate_->Init(); 423 launcher_delegate_->Init();
(...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after
577 ash::Shell::GetInstance()->ShowLauncher(); 578 ash::Shell::GetInstance()->ShowLauncher();
578 break; 579 break;
579 default: 580 default:
580 NOTREACHED() << "Unexpected notification " << type; 581 NOTREACHED() << "Unexpected notification " << type;
581 } 582 }
582 #else 583 #else
583 // MSVC++ warns about switch statements without any cases. 584 // MSVC++ warns about switch statements without any cases.
584 NOTREACHED() << "Unexpected notification " << type; 585 NOTREACHED() << "Unexpected notification " << type;
585 #endif 586 #endif
586 } 587 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698