| 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" |
| (...skipping 418 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 429 ChromeShellDelegate::CreateContainerDelegate() { | 429 ChromeShellDelegate::CreateContainerDelegate() { |
| 430 return base::WrapUnique(new ash::ContainerDelegateAura); | 430 return base::WrapUnique(new ash::ContainerDelegateAura); |
| 431 } | 431 } |
| 432 | 432 |
| 433 std::unique_ptr<ash::PointerWatcherDelegate> | 433 std::unique_ptr<ash::PointerWatcherDelegate> |
| 434 ChromeShellDelegate::CreatePointerWatcherDelegate() { | 434 ChromeShellDelegate::CreatePointerWatcherDelegate() { |
| 435 return base::WrapUnique(new ash::PointerWatcherDelegateAura); | 435 return base::WrapUnique(new ash::PointerWatcherDelegateAura); |
| 436 } | 436 } |
| 437 | 437 |
| 438 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( | 438 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( |
| 439 ash::Shelf* shelf, | 439 ash::WmShelf* wm_shelf, |
| 440 const ash::ShelfItem* item) { | 440 const ash::ShelfItem* item) { |
| 441 DCHECK(shelf_delegate_); | 441 DCHECK(shelf_delegate_); |
| 442 // Don't show context menu for exclusive app runtime mode. | 442 // Don't show context menu for exclusive app runtime mode. |
| 443 if (chrome::IsRunningInAppMode()) | 443 if (chrome::IsRunningInAppMode()) |
| 444 return nullptr; | 444 return nullptr; |
| 445 | 445 |
| 446 return LauncherContextMenu::Create(shelf_delegate_, item, shelf); | 446 return LauncherContextMenu::Create(shelf_delegate_, item, wm_shelf); |
| 447 } | 447 } |
| 448 | 448 |
| 449 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() { | 449 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() { |
| 450 // Chrome uses real GPU support. | 450 // Chrome uses real GPU support. |
| 451 return new ash::GPUSupportImpl; | 451 return new ash::GPUSupportImpl; |
| 452 } | 452 } |
| 453 | 453 |
| 454 base::string16 ChromeShellDelegate::GetProductName() const { | 454 base::string16 ChromeShellDelegate::GetProductName() const { |
| 455 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 455 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
| 456 } | 456 } |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 NOTREACHED() << "Unexpected notification " << type; | 560 NOTREACHED() << "Unexpected notification " << type; |
| 561 } | 561 } |
| 562 } | 562 } |
| 563 | 563 |
| 564 void ChromeShellDelegate::PlatformInit() { | 564 void ChromeShellDelegate::PlatformInit() { |
| 565 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 565 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 566 content::NotificationService::AllSources()); | 566 content::NotificationService::AllSources()); |
| 567 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 567 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
| 568 content::NotificationService::AllSources()); | 568 content::NotificationService::AllSources()); |
| 569 } | 569 } |
| OLD | NEW |