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

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

Issue 1921673005: mus: Add PointerWatcher for passively observing mouse and touch events (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 4 years, 7 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 | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | components/mus/demo/mus_demo.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/pointer_watcher_delegate_aura.h"
10 #include "ash/session/session_state_delegate.h" 11 #include "ash/session/session_state_delegate.h"
11 #include "ash/wm/common/window_state.h" 12 #include "ash/wm/common/window_state.h"
12 #include "ash/wm/window_util.h" 13 #include "ash/wm/window_util.h"
14 #include "base/memory/ptr_util.h"
13 #include "build/build_config.h" 15 #include "build/build_config.h"
14 #include "chrome/browser/app_mode/app_mode_utils.h" 16 #include "chrome/browser/app_mode/app_mode_utils.h"
15 #include "chrome/browser/lifetime/application_lifetime.h" 17 #include "chrome/browser/lifetime/application_lifetime.h"
16 #include "chrome/browser/profiles/profile_manager.h" 18 #include "chrome/browser/profiles/profile_manager.h"
17 #include "chrome/browser/profiles/profiles_state.h" 19 #include "chrome/browser/profiles/profiles_state.h"
18 #include "chrome/browser/ui/app_list/app_list_view_delegate.h" 20 #include "chrome/browser/ui/app_list/app_list_view_delegate.h"
19 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h" 21 #include "chrome/browser/ui/ash/app_list/app_list_service_ash.h"
20 #include "chrome/browser/ui/ash/chrome_keyboard_ui.h" 22 #include "chrome/browser/ui/ash/chrome_keyboard_ui.h"
21 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h" 23 #include "chrome/browser/ui/ash/launcher/chrome_launcher_controller.h"
22 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h" 24 #include "chrome/browser/ui/ash/launcher/launcher_context_menu.h"
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 149
148 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( 150 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate(
149 ash::ShelfModel* model) { 151 ash::ShelfModel* model) {
150 if (!shelf_delegate_) { 152 if (!shelf_delegate_) {
151 shelf_delegate_ = ChromeLauncherController::CreateInstance(NULL, model); 153 shelf_delegate_ = ChromeLauncherController::CreateInstance(NULL, model);
152 shelf_delegate_->Init(); 154 shelf_delegate_->Init();
153 } 155 }
154 return shelf_delegate_; 156 return shelf_delegate_;
155 } 157 }
156 158
159 std::unique_ptr<ash::PointerWatcherDelegate>
160 ChromeShellDelegate::CreatePointerWatcherDelegate() {
161 return base::WrapUnique(new ash::PointerWatcherDelegateAura);
162 }
163
157 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( 164 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(
158 ash::Shelf* shelf, 165 ash::Shelf* shelf,
159 const ash::ShelfItem* item) { 166 const ash::ShelfItem* item) {
160 DCHECK(shelf_delegate_); 167 DCHECK(shelf_delegate_);
161 // Don't show context menu for exclusive app runtime mode. 168 // Don't show context menu for exclusive app runtime mode.
162 if (chrome::IsRunningInAppMode()) 169 if (chrome::IsRunningInAppMode())
163 return nullptr; 170 return nullptr;
164 171
165 return LauncherContextMenu::Create(shelf_delegate_, item, shelf); 172 return LauncherContextMenu::Create(shelf_delegate_, item, shelf);
166 } 173 }
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
220 227
221 void ChromeShellDelegate::AddVirtualKeyboardStateObserver( 228 void ChromeShellDelegate::AddVirtualKeyboardStateObserver(
222 ash::VirtualKeyboardStateObserver* observer) { 229 ash::VirtualKeyboardStateObserver* observer) {
223 keyboard_state_observer_list_.AddObserver(observer); 230 keyboard_state_observer_list_.AddObserver(observer);
224 } 231 }
225 232
226 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver( 233 void ChromeShellDelegate::RemoveVirtualKeyboardStateObserver(
227 ash::VirtualKeyboardStateObserver* observer) { 234 ash::VirtualKeyboardStateObserver* observer) {
228 keyboard_state_observer_list_.RemoveObserver(observer); 235 keyboard_state_observer_list_.RemoveObserver(observer);
229 } 236 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | components/mus/demo/mus_demo.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698