Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(189)

Side by Side Diff: chrome/browser/ui/ash/chrome_shell_delegate.cc

Issue 2046843005: mash: Migrate shelf menus to wm common types (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ash_shell_with_content Created 4 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | chrome/browser/ui/ash/launcher/arc_launcher_context_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698