MD Downloads: prevent search text from overlapping with the cancel search (X)
[chromium-blink-merge.git] / ui / events / null_event_targeter.h
blobc22e7a7681fd3877798c31cecd9b83321557d8d7
1 // Copyright 2015 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
5 #include "base/compiler_specific.h"
6 #include "base/macros.h"
7 #include "ui/events/event_targeter.h"
8 #include "ui/events/events_export.h"
10 namespace ui {
12 // NullEventTargeter can be installed on a root window to prevent it from
13 // dispatching events such as during shutdown.
14 class EVENTS_EXPORT NullEventTargeter : public EventTargeter {
15 public:
16 NullEventTargeter();
17 ~NullEventTargeter() override;
19 // EventTargeter:
20 EventTarget* FindTargetForEvent(EventTarget* root, Event* event) override;
21 EventTarget* FindNextBestTarget(EventTarget* previous_target,
22 Event* event) override;
24 private:
25 DISALLOW_COPY_AND_ASSIGN(NullEventTargeter);
28 } // namespace ui