1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
ash / wm / event_client_impl.h [blame]
// Copyright 2012 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef ASH_WM_EVENT_CLIENT_IMPL_H_
#define ASH_WM_EVENT_CLIENT_IMPL_H_
#include "ash/ash_export.h"
#include "ui/aura/client/event_client.h"
namespace ash {
class ScopedSkipUserSessionBlockedCheck;
class ASH_EXPORT EventClientImpl : public aura::client::EventClient {
public:
EventClientImpl();
EventClientImpl(const EventClientImpl&) = delete;
EventClientImpl& operator=(const EventClientImpl&) = delete;
~EventClientImpl() override;
private:
friend class ScopedSkipUserSessionBlockedCheck;
// Overridden from aura::client::EventClient:
bool GetCanProcessEventsWithinSubtree(
const aura::Window* window) const override;
ui::EventTarget* GetToplevelEventTarget() override;
// This should only be used by ScopedSkipUserSessionBlockedCheck for blocks of
// code which we want the checking of the user session to be blocked (ie.
// building mru list when entering tablet mode in lock screen).
void set_skip_user_session_blocked_check(
bool skip_user_session_blocked_check) {
skip_user_session_blocked_check_ = skip_user_session_blocked_check;
}
// Flag indicating whether the user sesion checks in
// GetCanProcessEventsWithinSubtree should be skipped.
bool skip_user_session_blocked_check_ = false;
};
} // namespace ash
#endif // ASH_WM_EVENT_CLIENT_IMPL_H_