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

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

Issue 2267023003: ash: Eliminate PointerWatcherDelegate (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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') | no next file » | 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 <limits> 9 #include <limits>
10 10
11 #include "ash/accelerators/magnifier_key_scroller.h" 11 #include "ash/accelerators/magnifier_key_scroller.h"
12 #include "ash/accelerators/spoken_feedback_toggler.h" 12 #include "ash/accelerators/spoken_feedback_toggler.h"
13 #include "ash/aura/wm_window_aura.h" 13 #include "ash/aura/wm_window_aura.h"
14 #include "ash/common/accessibility_delegate.h" 14 #include "ash/common/accessibility_delegate.h"
15 #include "ash/common/accessibility_types.h" 15 #include "ash/common/accessibility_types.h"
16 #include "ash/common/session/session_state_delegate.h" 16 #include "ash/common/session/session_state_delegate.h"
17 #include "ash/common/wm/mru_window_tracker.h" 17 #include "ash/common/wm/mru_window_tracker.h"
18 #include "ash/common/wm/window_state.h" 18 #include "ash/common/wm/window_state.h"
19 #include "ash/common/wm_shell.h" 19 #include "ash/common/wm_shell.h"
20 #include "ash/content/gpu_support_impl.h" 20 #include "ash/content/gpu_support_impl.h"
21 #include "ash/pointer_watcher_delegate_aura.h"
22 #include "ash/shell.h" 21 #include "ash/shell.h"
23 #include "ash/wm/window_util.h" 22 #include "ash/wm/window_util.h"
24 #include "base/command_line.h" 23 #include "base/command_line.h"
25 #include "base/macros.h" 24 #include "base/macros.h"
26 #include "base/memory/ptr_util.h" 25 #include "base/memory/ptr_util.h"
27 #include "build/build_config.h" 26 #include "build/build_config.h"
28 #include "chrome/browser/app_mode/app_mode_utils.h" 27 #include "chrome/browser/app_mode/app_mode_utils.h"
29 #include "chrome/browser/chrome_notification_types.h" 28 #include "chrome/browser/chrome_notification_types.h"
30 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h" 29 #include "chrome/browser/chromeos/accessibility/accessibility_manager.h"
31 #include "chrome/browser/chromeos/accessibility/magnification_manager.h" 30 #include "chrome/browser/chromeos/accessibility/magnification_manager.h"
(...skipping 394 matching lines...) Expand 10 before | Expand all | Expand 10 after
426 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate( 425 ash::ShelfDelegate* ChromeShellDelegate::CreateShelfDelegate(
427 ash::ShelfModel* model) { 426 ash::ShelfModel* model) {
428 if (!shelf_delegate_) { 427 if (!shelf_delegate_) {
429 shelf_delegate_ = 428 shelf_delegate_ =
430 ChromeLauncherControllerImpl::CreateInstance(nullptr, model); 429 ChromeLauncherControllerImpl::CreateInstance(nullptr, model);
431 shelf_delegate_->Init(); 430 shelf_delegate_->Init();
432 } 431 }
433 return shelf_delegate_; 432 return shelf_delegate_;
434 } 433 }
435 434
436 std::unique_ptr<ash::PointerWatcherDelegate>
437 ChromeShellDelegate::CreatePointerWatcherDelegate() {
438 return base::WrapUnique(new ash::PointerWatcherDelegateAura);
439 }
440
441 ui::MenuModel* ChromeShellDelegate::CreateContextMenu( 435 ui::MenuModel* ChromeShellDelegate::CreateContextMenu(
442 ash::WmShelf* wm_shelf, 436 ash::WmShelf* wm_shelf,
443 const ash::ShelfItem* item) { 437 const ash::ShelfItem* item) {
444 DCHECK(shelf_delegate_); 438 DCHECK(shelf_delegate_);
445 // Don't show context menu for exclusive app runtime mode. 439 // Don't show context menu for exclusive app runtime mode.
446 if (chrome::IsRunningInAppMode()) 440 if (chrome::IsRunningInAppMode())
447 return nullptr; 441 return nullptr;
448 442
449 return LauncherContextMenu::Create(shelf_delegate_, item, wm_shelf); 443 return LauncherContextMenu::Create(shelf_delegate_, item, wm_shelf);
450 } 444 }
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
552 NOTREACHED() << "Unexpected notification " << type; 546 NOTREACHED() << "Unexpected notification " << type;
553 } 547 }
554 } 548 }
555 549
556 void ChromeShellDelegate::PlatformInit() { 550 void ChromeShellDelegate::PlatformInit() {
557 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED, 551 registrar_.Add(this, chrome::NOTIFICATION_LOGIN_USER_PROFILE_PREPARED,
558 content::NotificationService::AllSources()); 552 content::NotificationService::AllSources());
559 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED, 553 registrar_.Add(this, chrome::NOTIFICATION_SESSION_STARTED,
560 content::NotificationService::AllSources()); 554 content::NotificationService::AllSources());
561 } 555 }
OLDNEW
« no previous file with comments | « chrome/browser/ui/ash/chrome_shell_delegate.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698