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" |
11 #include "ash/wm/stacking_controller.h" | |
12 #include "ash/wm/window_properties.h" | 11 #include "ash/wm/window_properties.h" |
13 #include "ash/wm/window_util.h" | 12 #include "ash/wm/window_util.h" |
14 #include "base/bind.h" | 13 #include "base/bind.h" |
15 #include "base/command_line.h" | 14 #include "base/command_line.h" |
16 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 15 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
17 #include "chrome/browser/chromeos/login/screen_locker.h" | 16 #include "chrome/browser/chromeos/login/screen_locker.h" |
18 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" | 17 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" |
19 #include "chrome/browser/lifetime/application_lifetime.h" | 18 #include "chrome/browser/lifetime/application_lifetime.h" |
20 #include "chrome/browser/prefs/pref_service.h" | 19 #include "chrome/browser/prefs/pref_service.h" |
21 #include "chrome/browser/profiles/profile_manager.h" | 20 #include "chrome/browser/profiles/profile_manager.h" |
(...skipping 533 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
555 } | 554 } |
556 #endif | 555 #endif |
557 return std::numeric_limits<double>::min(); | 556 return std::numeric_limits<double>::min(); |
558 } | 557 } |
559 | 558 |
560 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::RootWindow* root) { | 559 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::RootWindow* root) { |
561 DCHECK(launcher_delegate_); | 560 DCHECK(launcher_delegate_); |
562 return new LauncherContextMenu(launcher_delegate_, root); | 561 return new LauncherContextMenu(launcher_delegate_, root); |
563 } | 562 } |
564 | 563 |
565 aura::client::StackingClient* ChromeShellDelegate::CreateStackingClient() { | |
566 return new ash::StackingController; | |
567 } | |
568 | |
569 ash::RootWindowHostFactory* ChromeShellDelegate::CreateRootWindowHostFactory() { | 564 ash::RootWindowHostFactory* ChromeShellDelegate::CreateRootWindowHostFactory() { |
570 return ash::RootWindowHostFactory::Create(); | 565 return ash::RootWindowHostFactory::Create(); |
571 } | 566 } |
572 | 567 |
573 void ChromeShellDelegate::Observe(int type, | 568 void ChromeShellDelegate::Observe(int type, |
574 const content::NotificationSource& source, | 569 const content::NotificationSource& source, |
575 const content::NotificationDetails& details) { | 570 const content::NotificationDetails& details) { |
576 #if defined(OS_CHROMEOS) | 571 #if defined(OS_CHROMEOS) |
577 switch (type) { | 572 switch (type) { |
578 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: | 573 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: |
579 ash::Shell::GetInstance()->CreateLauncher(); | 574 ash::Shell::GetInstance()->CreateLauncher(); |
580 break; | 575 break; |
581 case chrome::NOTIFICATION_SESSION_STARTED: | 576 case chrome::NOTIFICATION_SESSION_STARTED: |
582 ash::Shell::GetInstance()->ShowLauncher(); | 577 ash::Shell::GetInstance()->ShowLauncher(); |
583 break; | 578 break; |
584 default: | 579 default: |
585 NOTREACHED() << "Unexpected notification " << type; | 580 NOTREACHED() << "Unexpected notification " << type; |
586 } | 581 } |
587 #else | 582 #else |
588 // MSVC++ warns about switch statements without any cases. | 583 // MSVC++ warns about switch statements without any cases. |
589 NOTREACHED() << "Unexpected notification " << type; | 584 NOTREACHED() << "Unexpected notification " << type; |
590 #endif | 585 #endif |
591 } | 586 } |
OLD | NEW |