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

Side by Side Diff: ash/wm/event_client_impl.cc

Issue 2111443002: mash: Migrate SessionStateDelegate access to WmShell. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 5 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
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 "ash/wm/event_client_impl.h" 5 #include "ash/wm/event_client_impl.h"
6 6
7 #include "ash/common/session/session_state_delegate.h" 7 #include "ash/common/session/session_state_delegate.h"
8 #include "ash/common/shell_window_ids.h" 8 #include "ash/common/shell_window_ids.h"
9 #include "ash/common/wm_shell.h"
9 #include "ash/shell.h" 10 #include "ash/shell.h"
10 #include "ui/aura/window.h" 11 #include "ui/aura/window.h"
11 #include "ui/keyboard/keyboard_util.h" 12 #include "ui/keyboard/keyboard_util.h"
12 13
13 namespace ash { 14 namespace ash {
14 15
15 EventClientImpl::EventClientImpl() {} 16 EventClientImpl::EventClientImpl() {}
16 17
17 EventClientImpl::~EventClientImpl() {} 18 EventClientImpl::~EventClientImpl() {}
18 19
19 bool EventClientImpl::CanProcessEventsWithinSubtree( 20 bool EventClientImpl::CanProcessEventsWithinSubtree(
20 const aura::Window* window) const { 21 const aura::Window* window) const {
21 // TODO(oshima): Migrate this logic to Shell::CanWindowReceieveEvents and 22 // TODO(oshima): Migrate this logic to Shell::CanWindowReceieveEvents and
22 // remove this. 23 // remove this.
23 const aura::Window* root_window = window ? window->GetRootWindow() : NULL; 24 const aura::Window* root_window = window ? window->GetRootWindow() : NULL;
24 if (!root_window || 25 if (!root_window ||
25 !Shell::GetInstance()->session_state_delegate()->IsUserSessionBlocked()) { 26 !WmShell::Get()->GetSessionStateDelegate()->IsUserSessionBlocked()) {
26 return true; 27 return true;
27 } 28 }
28 29
29 const aura::Window* lock_screen_containers = Shell::GetContainer( 30 const aura::Window* lock_screen_containers = Shell::GetContainer(
30 root_window, kShellWindowId_LockScreenContainersContainer); 31 root_window, kShellWindowId_LockScreenContainersContainer);
31 const aura::Window* lock_background_containers = Shell::GetContainer( 32 const aura::Window* lock_background_containers = Shell::GetContainer(
32 root_window, kShellWindowId_LockScreenBackgroundContainer); 33 root_window, kShellWindowId_LockScreenBackgroundContainer);
33 const aura::Window* lock_screen_related_containers = Shell::GetContainer( 34 const aura::Window* lock_screen_related_containers = Shell::GetContainer(
34 root_window, kShellWindowId_LockScreenRelatedContainersContainer); 35 root_window, kShellWindowId_LockScreenRelatedContainersContainer);
35 bool can_process_events = 36 bool can_process_events =
(...skipping 10 matching lines...) Expand all
46 virtual_keyboard_container->Contains(window)); 47 virtual_keyboard_container->Contains(window));
47 } 48 }
48 return can_process_events; 49 return can_process_events;
49 } 50 }
50 51
51 ui::EventTarget* EventClientImpl::GetToplevelEventTarget() { 52 ui::EventTarget* EventClientImpl::GetToplevelEventTarget() {
52 return Shell::GetInstance(); 53 return Shell::GetInstance();
53 } 54 }
54 55
55 } // namespace ash 56 } // namespace ash
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698