| 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 26 matching lines...) Expand all Loading... |
| 37 #include "chrome/browser/chromeos/system/input_device_settings.h" | 37 #include "chrome/browser/chromeos/system/input_device_settings.h" |
| 38 #include "chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h" | 38 #include "chrome/browser/chromeos/ui/accessibility_focus_ring_controller.h" |
| 39 #include "chrome/browser/lifetime/application_lifetime.h" | 39 #include "chrome/browser/lifetime/application_lifetime.h" |
| 40 #include "chrome/browser/profiles/profile.h" | 40 #include "chrome/browser/profiles/profile.h" |
| 41 #include "chrome/browser/profiles/profile_manager.h" | 41 #include "chrome/browser/profiles/profile_manager.h" |
| 42 #include "chrome/browser/profiles/profiles_state.h" | 42 #include "chrome/browser/profiles/profiles_state.h" |
| 43 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" | 43 #include "chrome/browser/signin/signin_error_notifier_factory_ash.h" |
| 44 #include "chrome/browser/speech/tts_controller.h" | 44 #include "chrome/browser/speech/tts_controller.h" |
| 45 #include "chrome/browser/sync/sync_error_notifier_factory_ash.h" | 45 #include "chrome/browser/sync/sync_error_notifier_factory_ash.h" |
| 46 #include "chrome/browser/ui/ash/chrome_keyboard_ui.h" | 46 #include "chrome/browser/ui/ash/chrome_keyboard_ui.h" |
| 47 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller_impl.h" | 47 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" |
| 48 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" | 48 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" |
| 49 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" | 49 #include "chrome/browser/ui/ash/multi_user/multi_user_util.h" |
| 50 #include "chrome/browser/ui/ash/palette_delegate_chromeos.h" | 50 #include "chrome/browser/ui/ash/palette_delegate_chromeos.h" |
| 51 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" | 51 #include "chrome/browser/ui/ash/session_state_delegate_chromeos.h" |
| 52 #include "chrome/browser/ui/ash/session_util.h" | 52 #include "chrome/browser/ui/ash/session_util.h" |
| 53 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" | 53 #include "chrome/browser/ui/ash/system_tray_delegate_chromeos.h" |
| 54 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" | 54 #include "chrome/browser/ui/aura/accessibility/automation_manager_aura.h" |
| 55 #include "chrome/browser/ui/browser.h" | 55 #include "chrome/browser/ui/browser.h" |
| 56 #include "chrome/browser/ui/browser_commands.h" | 56 #include "chrome/browser/ui/browser_commands.h" |
| 57 #include "chrome/browser/ui/browser_finder.h" | 57 #include "chrome/browser/ui/browser_finder.h" |
| (...skipping 434 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 492 ui::PAGE_TRANSITION_FROM_API)); | 492 ui::PAGE_TRANSITION_FROM_API)); |
| 493 | 493 |
| 494 // Since the ScopedTabbedBrowserDisplayer does not guarantee that the | 494 // Since the ScopedTabbedBrowserDisplayer does not guarantee that the |
| 495 // browser will be shown on the active desktop, we ensure the visibility. | 495 // browser will be shown on the active desktop, we ensure the visibility. |
| 496 multi_user_util::MoveWindowToCurrentDesktop( | 496 multi_user_util::MoveWindowToCurrentDesktop( |
| 497 displayer.browser()->window()->GetNativeWindow()); | 497 displayer.browser()->window()->GetNativeWindow()); |
| 498 } | 498 } |
| 499 | 499 |
| 500 void ChromeShellDelegate::ShelfInit() { | 500 void ChromeShellDelegate::ShelfInit() { |
| 501 if (!launcher_controller_) { | 501 if (!launcher_controller_) { |
| 502 launcher_controller_ = base::MakeUnique<ChromeLauncherControllerImpl>( | 502 launcher_controller_ = base::MakeUnique<ChromeLauncherController>( |
| 503 nullptr, ash::Shell::Get()->shelf_model()); | 503 nullptr, ash::Shell::Get()->shelf_model()); |
| 504 launcher_controller_->Init(); | 504 launcher_controller_->Init(); |
| 505 } | 505 } |
| 506 } | 506 } |
| 507 | 507 |
| 508 void ChromeShellDelegate::ShelfShutdown() { | 508 void ChromeShellDelegate::ShelfShutdown() { |
| 509 launcher_controller_.reset(); | 509 launcher_controller_.reset(); |
| 510 } | 510 } |
| 511 | 511 |
| 512 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( | 512 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 634 NOTREACHED() << "Unexpected notification " << type; | 634 NOTREACHED() << "Unexpected notification " << type; |
| 635 } | 635 } |
| 636 } | 636 } |
| 637 | 637 |
| 638 void ChromeShellDelegate::PlatformInit() { | 638 void ChromeShellDelegate::PlatformInit() { |
| 639 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 639 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 640 content::NotificationService::AllSources()); | 640 content::NotificationService::AllSources()); |
| 641 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 641 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
| 642 content::NotificationService::AllSources()); | 642 content::NotificationService::AllSources()); |
| 643 } | 643 } |
| OLD | NEW |