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/launcher/launcher_types.h" | 7 #include "ash/launcher/launcher_types.h" |
8 #include "ash/system/tray/system_tray_delegate.h" | 8 #include "ash/system/tray/system_tray_delegate.h" |
| 9 #include "ash/wm/stacking_controller.h" |
9 #include "ash/wm/window_util.h" | 10 #include "ash/wm/window_util.h" |
10 #include "base/bind.h" | 11 #include "base/bind.h" |
11 #include "base/command_line.h" | 12 #include "base/command_line.h" |
12 #include "chrome/browser/chromeos/login/screen_locker.h" | 13 #include "chrome/browser/chromeos/login/screen_locker.h" |
13 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" | 14 #include "chrome/browser/extensions/api/terminal/terminal_extension_helper.h" |
14 #include "chrome/browser/lifetime/application_lifetime.h" | 15 #include "chrome/browser/lifetime/application_lifetime.h" |
15 #include "chrome/browser/prefs/pref_service.h" | 16 #include "chrome/browser/prefs/pref_service.h" |
16 #include "chrome/browser/profiles/profile_manager.h" | 17 #include "chrome/browser/profiles/profile_manager.h" |
17 #include "chrome/browser/sessions/tab_restore_service.h" | 18 #include "chrome/browser/sessions/tab_restore_service.h" |
18 #include "chrome/browser/sessions/tab_restore_service_factory.h" | 19 #include "chrome/browser/sessions/tab_restore_service_factory.h" |
(...skipping 445 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
464 return profile->GetPrefs()->GetDouble(prefs::kScreenMagnifierScale); | 465 return profile->GetPrefs()->GetDouble(prefs::kScreenMagnifierScale); |
465 #endif | 466 #endif |
466 return std::numeric_limits<double>::min(); | 467 return std::numeric_limits<double>::min(); |
467 } | 468 } |
468 | 469 |
469 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::RootWindow* root) { | 470 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(aura::RootWindow* root) { |
470 DCHECK(launcher_delegate_); | 471 DCHECK(launcher_delegate_); |
471 return new LauncherContextMenu(launcher_delegate_, root); | 472 return new LauncherContextMenu(launcher_delegate_, root); |
472 } | 473 } |
473 | 474 |
| 475 aura::client::StackingClient* ChromeShellDelegate::CreateStackingClient() { |
| 476 return new ash::StackingController; |
| 477 } |
| 478 |
474 void ChromeShellDelegate::Observe(int type, | 479 void ChromeShellDelegate::Observe(int type, |
475 const content::NotificationSource& source, | 480 const content::NotificationSource& source, |
476 const content::NotificationDetails& details) { | 481 const content::NotificationDetails& details) { |
477 #if defined(OS_CHROMEOS) | 482 #if defined(OS_CHROMEOS) |
478 switch (type) { | 483 switch (type) { |
479 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: | 484 case chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED: |
480 ash::Shell::GetInstance()->CreateLauncher(); | 485 ash::Shell::GetInstance()->CreateLauncher(); |
481 break; | 486 break; |
482 case chrome::NOTIFICATION_SESSION_STARTED: | 487 case chrome::NOTIFICATION_SESSION_STARTED: |
483 ash::Shell::GetInstance()->ShowLauncher(); | 488 ash::Shell::GetInstance()->ShowLauncher(); |
484 break; | 489 break; |
485 default: | 490 default: |
486 NOTREACHED() << "Unexpected notification " << type; | 491 NOTREACHED() << "Unexpected notification " << type; |
487 } | 492 } |
488 #else | 493 #else |
489 // MSVC++ warns about switch statements without any cases. | 494 // MSVC++ warns about switch statements without any cases. |
490 NOTREACHED() << "Unexpected notification " << type; | 495 NOTREACHED() << "Unexpected notification " << type; |
491 #endif | 496 #endif |
492 } | 497 } |
OLD | NEW |