| 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 369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 380 return false; | 380 return false; |
| 381 | 381 |
| 382 PrefService* user_pref_service = profile->GetPrefs(); | 382 PrefService* user_pref_service = profile->GetPrefs(); |
| 383 return user_pref_service && | 383 return user_pref_service && |
| 384 user_pref_service->GetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu); | 384 user_pref_service->GetBoolean(prefs::kShouldAlwaysShowAccessibilityMenu); |
| 385 #else | 385 #else |
| 386 return false; | 386 return false; |
| 387 #endif | 387 #endif |
| 388 } | 388 } |
| 389 | 389 |
| 390 bool ChromeShellDelegate::IsImmersiveMode() const { |
| 391 Browser* browser = |
| 392 chrome::FindBrowserWithWindow(ash::wm::GetActiveWindow()); |
| 393 if (!browser) |
| 394 return false; |
| 395 return browser->window()->IsImmersiveMode(); |
| 396 } |
| 397 |
| 390 app_list::AppListViewDelegate* | 398 app_list::AppListViewDelegate* |
| 391 ChromeShellDelegate::CreateAppListViewDelegate() { | 399 ChromeShellDelegate::CreateAppListViewDelegate() { |
| 392 DCHECK(ash::Shell::HasInstance()); | 400 DCHECK(ash::Shell::HasInstance()); |
| 393 // Shell will own the created delegate, and the delegate will own | 401 // Shell will own the created delegate, and the delegate will own |
| 394 // the controller. | 402 // the controller. |
| 395 return new AppListViewDelegate(new AppListControllerDelegateAsh()); | 403 return new AppListViewDelegate(new AppListControllerDelegateAsh()); |
| 396 } | 404 } |
| 397 | 405 |
| 398 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( | 406 ash::LauncherDelegate* ChromeShellDelegate::CreateLauncherDelegate( |
| 399 ash::LauncherModel* model) { | 407 ash::LauncherModel* model) { |
| (...skipping 157 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 557 ash::Shell::GetInstance()->ShowLauncher(); | 565 ash::Shell::GetInstance()->ShowLauncher(); |
| 558 break; | 566 break; |
| 559 default: | 567 default: |
| 560 NOTREACHED() << "Unexpected notification " << type; | 568 NOTREACHED() << "Unexpected notification " << type; |
| 561 } | 569 } |
| 562 #else | 570 #else |
| 563 // MSVC++ warns about switch statements without any cases. | 571 // MSVC++ warns about switch statements without any cases. |
| 564 NOTREACHED() << "Unexpected notification " << type; | 572 NOTREACHED() << "Unexpected notification " << type; |
| 565 #endif | 573 #endif |
| 566 } | 574 } |
| OLD | NEW |