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 <limits> | 9 #include <limits> |
10 | 10 |
(...skipping 416 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
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); |
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 Loading... |
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 } |
OLD | NEW |