forked from chromium/chromium
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathnull_event_targeter.h
33 lines (25 loc) · 997 Bytes
/
null_event_targeter.h
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
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef UI_EVENTS_NULL_EVENT_TARGETER_H_
#define UI_EVENTS_NULL_EVENT_TARGETER_H_
#include "base/compiler_specific.h"
#include "base/macros.h"
#include "ui/events/event_targeter.h"
#include "ui/events/events_export.h"
namespace ui {
// NullEventTargeter can be installed on a root window to prevent it from
// dispatching events such as during shutdown.
class EVENTS_EXPORT NullEventTargeter : public EventTargeter {
public:
NullEventTargeter();
~NullEventTargeter() override;
// EventTargeter:
EventTarget* FindTargetForEvent(EventTarget* root, Event* event) override;
EventTarget* FindNextBestTarget(EventTarget* previous_target,
Event* event) override;
private:
DISALLOW_COPY_AND_ASSIGN(NullEventTargeter);
};
} // namespace ui
#endif // UI_EVENTS_NULL_EVENT_TARGETER_H_