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

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

Issue 2391253004: Use mojo Shelf interfaces for both mash and classic ash. (Closed)
Patch Set: Address most comments, except manifest, need to sync. Created 4 years, 2 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 <limits> 9 #include <limits>
10 10
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after
427 } 427 }
428 428
429 app_list::AppListPresenter* ChromeShellDelegate::GetAppListPresenter() { 429 app_list::AppListPresenter* ChromeShellDelegate::GetAppListPresenter() {
430 DCHECK(ash::Shell::HasInstance()); 430 DCHECK(ash::Shell::HasInstance());
431 return AppListServiceAsh::GetInstance()->GetAppListPresenter(); 431 return AppListServiceAsh::GetInstance()->GetAppListPresenter();
432 } 432 }
433 433
434 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( 434 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate(
435 ash::ShelfModel* model) { 435 ash::ShelfModel* model) {
436 if (!shelf_delegate_) { 436 if (!shelf_delegate_) {
437 shelf_delegate_ = 437 shelf_delegate_ = new ChromeLauncherControllerImpl(nullptr, model);
sky 2016/10/07 22:59:37 Does this leak?
msw 2016/10/07 23:13:01 No, it's owned by the unique_ptr WmShell::shelf_de
438 ChromeLauncherControllerImpl::CreateInstance(nullptr, model);
439 shelf_delegate_->Init(); 438 shelf_delegate_->Init();
440 } 439 }
441 return shelf_delegate_; 440 return shelf_delegate_;
442 } 441 }
443 442
444 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( 443 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(
445 ash::WmShelf* wm_shelf, 444 ash::WmShelf* wm_shelf,
446 const ash::ShelfItem* item) { 445 const ash::ShelfItem* item) {
447 DCHECK(shelf_delegate_); 446 DCHECK(shelf_delegate_);
448 // Don't show context menu for exclusive app runtime mode. 447 // Don't show context menu for exclusive app runtime mode.
(...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after
556 NOTREACHED() << "Unexpected notification " << type; 555 NOTREACHED() << "Unexpected notification " << type;
557 } 556 }
558 } 557 }
559 558
560 void ChromeShellDelegate::PlatformInit() { 559 void ChromeShellDelegate::PlatformInit() {
561 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 560 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
562 content::NotificationService::AllSources()); 561 content::NotificationService::AllSources());
563 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, 562 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
564 content::NotificationService::AllSources()); 563 content::NotificationService::AllSources());
565 } 564 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/ash_init.cc ('k') | chrome/browser/ui/ash/launcher/app_shortcut_launcher_item_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698