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/content/gpu_support_impl.h" | 18 #include "ash/content/gpu_support_impl.h" |
19 #include "ash/pointer_down_watcher_delegate_aura.h" | 19 #include "ash/pointer_watcher_delegate_aura.h" |
20 #include "ash/shell.h" | 20 #include "ash/shell.h" |
21 #include "ash/wm/window_util.h" | 21 #include "ash/wm/window_util.h" |
22 #include "base/command_line.h" | 22 #include "base/command_line.h" |
23 #include "base/macros.h" | 23 #include "base/macros.h" |
24 #include "base/memory/ptr_util.h" | 24 #include "base/memory/ptr_util.h" |
25 #include "build/build_config.h" | 25 #include "build/build_config.h" |
26 #include "chrome/browser/app_mode/app_mode_utils.h" | 26 #include "chrome/browser/app_mode/app_mode_utils.h" |
27 #include "chrome/browser/chrome_notification_types.h" | 27 #include "chrome/browser/chrome_notification_types.h" |
28 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" | 28 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" |
29 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" | 29 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" |
(...skipping 391 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
421 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( | 421 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( |
422 ash::ShelfModel* model) { | 422 ash::ShelfModel* model) { |
423 if (!shelf_delegate_) { | 423 if (!shelf_delegate_) { |
424 shelf_delegate_ = | 424 shelf_delegate_ = |
425 ChromeLauncherControllerImpl::CreateInstance(nullptr, model); | 425 ChromeLauncherControllerImpl::CreateInstance(nullptr, model); |
426 shelf_delegate_->Init(); | 426 shelf_delegate_->Init(); |
427 } | 427 } |
428 return shelf_delegate_; | 428 return shelf_delegate_; |
429 } | 429 } |
430 | 430 |
431 std::unique_ptr<ash::PointerDownWatcherDelegate> | 431 std::unique_ptr<ash::PointerWatcherDelegate> |
432 ChromeShellDelegate::CreatePointerDownWatcherDelegate() { | 432 ChromeShellDelegate::CreatePointerWatcherDelegate() { |
433 return base::WrapUnique(new ash::PointerDownWatcherDelegateAura); | 433 return base::WrapUnique(new ash::PointerWatcherDelegateAura); |
434 } | 434 } |
435 | 435 |
436 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( | 436 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( |
437 ash::WmShelf* wm_shelf, | 437 ash::WmShelf* wm_shelf, |
438 const ash::ShelfItem* item) { | 438 const ash::ShelfItem* item) { |
439 DCHECK(shelf_delegate_); | 439 DCHECK(shelf_delegate_); |
440 // Don't show context menu for exclusive app runtime mode. | 440 // Don't show context menu for exclusive app runtime mode. |
441 if (chrome::IsRunningInAppMode()) | 441 if (chrome::IsRunningInAppMode()) |
442 return nullptr; | 442 return nullptr; |
443 | 443 |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
542 NOTREACHED() << "Unexpected notification " << type; | 542 NOTREACHED() << "Unexpected notification " << type; |
543 } | 543 } |
544 } | 544 } |
545 | 545 |
546 void ChromeShellDelegate::PlatformInit() { | 546 void ChromeShellDelegate::PlatformInit() { |
547 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 547 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
548 content::NotificationService::AllSources()); | 548 content::NotificationService::AllSources()); |
549 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 549 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
550 content::NotificationService::AllSources()); | 550 content::NotificationService::AllSources()); |
551 } | 551 } |
OLD | NEW |