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 <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
425 } | 425 } |
426 | 426 |
427 bool ChromeShellDelegate::IsIncognitoAllowed() const { | 427 bool ChromeShellDelegate::IsIncognitoAllowed() const { |
428 return AccessibilityManager::Get()->IsIncognitoAllowed(); | 428 return AccessibilityManager::Get()->IsIncognitoAllowed(); |
429 } | 429 } |
430 | 430 |
431 bool ChromeShellDelegate::IsRunningInForcedAppMode() const { | 431 bool ChromeShellDelegate::IsRunningInForcedAppMode() const { |
432 return chrome::IsRunningInForcedAppMode(); | 432 return chrome::IsRunningInForcedAppMode(); |
433 } | 433 } |
434 | 434 |
435 bool ChromeShellDelegate::CanShowWindowForUser(ash::WmWindow* window) const { | 435 bool ChromeShellDelegate::CanShowWindowForUser(aura::Window* window) const { |
436 return ::CanShowWindowForUser(ash::WmWindow::GetAuraWindow(window), | 436 return ::CanShowWindowForUser(window, base::Bind(&GetActiveBrowserContext)); |
437 base::Bind(&GetActiveBrowserContext)); | |
438 } | 437 } |
439 | 438 |
440 bool ChromeShellDelegate::IsForceMaximizeOnFirstRun() const { | 439 bool ChromeShellDelegate::IsForceMaximizeOnFirstRun() const { |
441 const user_manager::User* const user = | 440 const user_manager::User* const user = |
442 user_manager::UserManager::Get()->GetActiveUser(); | 441 user_manager::UserManager::Get()->GetActiveUser(); |
443 if (user) { | 442 if (user) { |
444 return chromeos::ProfileHelper::Get() | 443 return chromeos::ProfileHelper::Get() |
445 ->GetProfileByUser(user) | 444 ->GetProfileByUser(user) |
446 ->GetPrefs() | 445 ->GetPrefs() |
447 ->GetBoolean(prefs::kForceMaximizeOnFirstRun); | 446 ->GetBoolean(prefs::kForceMaximizeOnFirstRun); |
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
644 NOTREACHED() << "Unexpected notification " << type; | 643 NOTREACHED() << "Unexpected notification " << type; |
645 } | 644 } |
646 } | 645 } |
647 | 646 |
648 void ChromeShellDelegate::PlatformInit() { | 647 void ChromeShellDelegate::PlatformInit() { |
649 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 648 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
650 content::NotificationService::AllSources()); | 649 content::NotificationService::AllSources()); |
651 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 650 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
652 content::NotificationService::AllSources()); | 651 content::NotificationService::AllSources()); |
653 } | 652 } |
OLD | NEW |