| 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 "ash/accelerators/magnifier_key_scroller.h" | 9 #include "ash/accelerators/magnifier_key_scroller.h" |
| 10 #include "ash/accelerators/spoken_feedback_toggler.h" | 10 #include "ash/accelerators/spoken_feedback_toggler.h" |
| 11 #include "ash/aura/wm_window_aura.h" | 11 #include "ash/aura/wm_window_aura.h" |
| 12 #include "ash/common/accessibility_delegate.h" | 12 #include "ash/common/accessibility_delegate.h" |
| 13 #include "ash/common/accessibility_types.h" | 13 #include "ash/common/accessibility_types.h" |
| 14 #include "ash/common/session/session_state_delegate.h" | 14 #include "ash/common/session/session_state_delegate.h" |
| 15 #include "ash/common/wm/mru_window_tracker.h" | 15 #include "ash/common/wm/mru_window_tracker.h" |
| 16 #include "ash/common/wm/window_state.h" | 16 #include "ash/common/wm/window_state.h" |
| 17 #include "ash/common/wm_shell.h" | 17 #include "ash/common/wm_shell.h" |
| 18 #include "ash/container_delegate_aura.h" | |
| 19 #include "ash/content/gpu_support_impl.h" | 18 #include "ash/content/gpu_support_impl.h" |
| 20 #include "ash/pointer_watcher_delegate_aura.h" | 19 #include "ash/pointer_watcher_delegate_aura.h" |
| 21 #include "ash/shell.h" | 20 #include "ash/shell.h" |
| 22 #include "ash/wm/window_util.h" | 21 #include "ash/wm/window_util.h" |
| 23 #include "base/command_line.h" | 22 #include "base/command_line.h" |
| 24 #include "base/macros.h" | 23 #include "base/macros.h" |
| 25 #include "base/memory/ptr_util.h" | 24 #include "base/memory/ptr_util.h" |
| 26 #include "build/build_config.h" | 25 #include "build/build_config.h" |
| 27 #include "chrome/browser/app_mode/app_mode_utils.h" | 26 #include "chrome/browser/app_mode/app_mode_utils.h" |
| 28 #include "chrome/browser/chrome_notification_types.h" | 27 #include "chrome/browser/chrome_notification_types.h" |
| (...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 423 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( | 422 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( |
| 424 ash::ShelfModel* model) { | 423 ash::ShelfModel* model) { |
| 425 if (!shelf_delegate_) { | 424 if (!shelf_delegate_) { |
| 426 shelf_delegate_ = | 425 shelf_delegate_ = |
| 427 ChromeLauncherControllerImpl::CreateInstance(nullptr, model); | 426 ChromeLauncherControllerImpl::CreateInstance(nullptr, model); |
| 428 shelf_delegate_->Init(); | 427 shelf_delegate_->Init(); |
| 429 } | 428 } |
| 430 return shelf_delegate_; | 429 return shelf_delegate_; |
| 431 } | 430 } |
| 432 | 431 |
| 433 std::unique_ptr<ash::ContainerDelegate> | |
| 434 ChromeShellDelegate::CreateContainerDelegate() { | |
| 435 return base::WrapUnique(new ash::ContainerDelegateAura); | |
| 436 } | |
| 437 | |
| 438 std::unique_ptr<ash::PointerWatcherDelegate> | 432 std::unique_ptr<ash::PointerWatcherDelegate> |
| 439 ChromeShellDelegate::CreatePointerWatcherDelegate() { | 433 ChromeShellDelegate::CreatePointerWatcherDelegate() { |
| 440 return base::WrapUnique(new ash::PointerWatcherDelegateAura); | 434 return base::WrapUnique(new ash::PointerWatcherDelegateAura); |
| 441 } | 435 } |
| 442 | 436 |
| 443 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( | 437 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( |
| 444 ash::WmShelf* wm_shelf, | 438 ash::WmShelf* wm_shelf, |
| 445 const ash::ShelfItem* item) { | 439 const ash::ShelfItem* item) { |
| 446 DCHECK(shelf_delegate_); | 440 DCHECK(shelf_delegate_); |
| 447 // Don't show context menu for exclusive app runtime mode. | 441 // Don't show context menu for exclusive app runtime mode. |
| (...skipping 117 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 565 NOTREACHED() << "Unexpected notification " << type; | 559 NOTREACHED() << "Unexpected notification " << type; |
| 566 } | 560 } |
| 567 } | 561 } |
| 568 | 562 |
| 569 void ChromeShellDelegate::PlatformInit() { | 563 void ChromeShellDelegate::PlatformInit() { |
| 570 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 564 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 571 content::NotificationService::AllSources()); | 565 content::NotificationService::AllSources()); |
| 572 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 566 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
| 573 content::NotificationService::AllSources()); | 567 content::NotificationService::AllSources()); |
| 574 } | 568 } |
| OLD | NEW |