| 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/launcher/launcher_types.h" | 8 #include "ash/launcher/launcher_types.h" |
| 8 #include "ash/magnifier/magnifier_constants.h" | 9 #include "ash/magnifier/magnifier_constants.h" |
| 9 #include "ash/system/tray/system_tray_delegate.h" | 10 #include "ash/system/tray/system_tray_delegate.h" |
| 10 #include "ash/wm/stacking_controller.h" | 11 #include "ash/wm/stacking_controller.h" |
| 11 #include "ash/wm/window_util.h" | 12 #include "ash/wm/window_util.h" |
| 12 #include "base/bind.h" | 13 #include "base/bind.h" |
| 13 #include "base/command_line.h" | 14 #include "base/command_line.h" |
| 14 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 15 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
| 15 #include "chrome/browser/chromeos/login/screen_locker.h" | 16 #include "chrome/browser/chromeos/login/screen_locker.h" |
| 16 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" | 17 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" |
| (...skipping 524 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 541 | 542 |
| 542 bool ChromeShellDelegate::IsSearchKeyActingAsFunctionKey() const { | 543 bool ChromeShellDelegate::IsSearchKeyActingAsFunctionKey() const { |
| 543 #if defined(OS_CHROMEOS) | 544 #if defined(OS_CHROMEOS) |
| 544 return CommandLine::ForCurrentProcess()->HasSwitch( | 545 return CommandLine::ForCurrentProcess()->HasSwitch( |
| 545 switches::kEnableChromebookFunctionKey); | 546 switches::kEnableChromebookFunctionKey); |
| 546 #else | 547 #else |
| 547 return false; | 548 return false; |
| 548 #endif | 549 #endif |
| 549 } | 550 } |
| 550 | 551 |
| 552 ash::RootWindowHostFactory* ChromeShellDelegate::CreateRootWindowHostFactory() { |
| 553 return ash::RootWindowHostFactory::Create(); |
| 554 } |
| 555 |
| 551 void ChromeShellDelegate::Observe(int type, | 556 void ChromeShellDelegate::Observe(int type, |
| 552 const content::NotificationSource& source, | 557 const content::NotificationSource& source, |
| 553 const content::NotificationDetails& details) { | 558 const content::NotificationDetails& details) { |
| 554 #if defined(OS_CHROMEOS) | 559 #if defined(OS_CHROMEOS) |
| 555 switch (type) { | 560 switch (type) { |
| 556 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: | 561 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: |
| 557 ash::Shell::GetInstance()->CreateLauncher(); | 562 ash::Shell::GetInstance()->CreateLauncher(); |
| 558 break; | 563 break; |
| 559 case chrome::NOTIFICATION_SESSION_STARTED: | 564 case chrome::NOTIFICATION_SESSION_STARTED: |
| 560 ash::Shell::GetInstance()->ShowLauncher(); | 565 ash::Shell::GetInstance()->ShowLauncher(); |
| 561 break; | 566 break; |
| 562 default: | 567 default: |
| 563 NOTREACHED() << "Unexpected notification " << type; | 568 NOTREACHED() << "Unexpected notification " << type; |
| 564 } | 569 } |
| 565 #else | 570 #else |
| 566 // MSVC++ warns about switch statements without any cases. | 571 // MSVC++ warns about switch statements without any cases. |
| 567 NOTREACHED() << "Unexpected notification " << type; | 572 NOTREACHED() << "Unexpected notification " << type; |
| 568 #endif | 573 #endif |
| 569 } | 574 } |
| OLD | NEW |