| 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/content/gpu_support_impl.h" | 9 #include "ash/content/gpu_support_impl.h" |
| 10 #include "ash/session/session_state_delegate.h" | 10 #include "ash/session/session_state_delegate.h" |
| (...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 155 } | 155 } |
| 156 | 156 |
| 157 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( | 157 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( |
| 158 ash::Shelf* shelf, | 158 ash::Shelf* shelf, |
| 159 const ash::ShelfItem* item) { | 159 const ash::ShelfItem* item) { |
| 160 DCHECK(shelf_delegate_); | 160 DCHECK(shelf_delegate_); |
| 161 // Don't show context menu for exclusive app runtime mode. | 161 // Don't show context menu for exclusive app runtime mode. |
| 162 if (chrome::IsRunningInAppMode()) | 162 if (chrome::IsRunningInAppMode()) |
| 163 return nullptr; | 163 return nullptr; |
| 164 | 164 |
| 165 return new LauncherContextMenu(shelf_delegate_, item, shelf); | 165 return LauncherContextMenu::Create(shelf_delegate_, item, shelf); |
| 166 } | 166 } |
| 167 | 167 |
| 168 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() { | 168 ash::GPUSupport* ChromeShellDelegate::CreateGPUSupport() { |
| 169 // Chrome uses real GPU support. | 169 // Chrome uses real GPU support. |
| 170 return new ash::GPUSupportImpl; | 170 return new ash::GPUSupportImpl; |
| 171 } | 171 } |
| 172 | 172 |
| 173 base::string16 ChromeShellDelegate::GetProductName() const { | 173 base::string16 ChromeShellDelegate::GetProductName() const { |
| 174 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); | 174 return l10n_util::GetStringUTF16(IDS_PRODUCT_NAME); |
| 175 } | 175 } |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 220 | 220 |
| 221 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( | 221 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( |
| 222 ash::VirtualKeyboardStateObserver* observer) { | 222 ash::VirtualKeyboardStateObserver* observer) { |
| 223 keyboard_state_observer_list_.AddObserver(observer); | 223 keyboard_state_observer_list_.AddObserver(observer); |
| 224 } | 224 } |
| 225 | 225 |
| 226 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( | 226 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( |
| 227 ash::VirtualKeyboardStateObserver* observer) { | 227 ash::VirtualKeyboardStateObserver* observer) { |
| 228 keyboard_state_observer_list_.RemoveObserver(observer); | 228 keyboard_state_observer_list_.RemoveObserver(observer); |
| 229 } | 229 } |
| OLD | NEW |