| 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 423 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 434 shelf_delegate_->Init(); | 434 shelf_delegate_->Init(); |
| 435 } | 435 } |
| 436 return shelf_delegate_; | 436 return shelf_delegate_; |
| 437 } | 437 } |
| 438 | 438 |
| 439 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( | 439 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( |
| 440 ash::WmShelf* wm_shelf, | 440 ash::WmShelf* wm_shelf, |
| 441 const ash::ShelfItem* item) { | 441 const ash::ShelfItem* item) { |
| 442 DCHECK(shelf_delegate_); | 442 DCHECK(shelf_delegate_); |
| 443 // Don't show context menu for exclusive app runtime mode. | 443 // Don't show context menu for exclusive app runtime mode. |
| 444 if (chrome::IsRunningInAppMode()) | 444 if (chrome::IsRunningInAppMode() || chrome::IsRunningInAndroidAppMode()) |
| 445 return nullptr; | 445 return nullptr; |
| 446 | 446 |
| 447 return LauncherContextMenu::Create(shelf_delegate_, item, wm_shelf); | 447 return LauncherContextMenu::Create(shelf_delegate_, item, wm_shelf); |
| 448 } | 448 } |
| 449 | 449 |
| 450 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() { | 450 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() { |
| 451 // Chrome uses real GPU support. | 451 // Chrome uses real GPU support. |
| 452 return new ash::GPUSupportImpl; | 452 return new ash::GPUSupportImpl; |
| 453 } | 453 } |
| 454 | 454 |
| (...skipping 92 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 547 NOTREACHED() << "Unexpected notification " << type; | 547 NOTREACHED() << "Unexpected notification " << type; |
| 548 } | 548 } |
| 549 } | 549 } |
| 550 | 550 |
| 551 void ChromeShellDelegate::PlatformInit() { | 551 void ChromeShellDelegate::PlatformInit() { |
| 552 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, | 552 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, |
| 553 content::NotificationService::AllSources()); | 553 content::NotificationService::AllSources()); |
| 554 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, | 554 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, |
| 555 content::NotificationService::AllSources()); | 555 content::NotificationService::AllSources()); |
| 556 } | 556 } |
| OLD | NEW |