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

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

Issue 1857213004: Refactor of LauncherContextMenu. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Nits update Created 4 years, 8 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
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/desktop_shell_launcher_context_menu.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/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
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
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 }
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/ui/ash/launcher/desktop_shell_launcher_context_menu.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698