Pin Chrome's shortcut to the Win10 Start menu on install and OS upgrade.
[chromium-blink-merge.git] / ui / events / test / test_event_targeter.cc
blob0794d45116ba708322408c2bae54426746770bb9
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 "ui/events/test/test_event_targeter.h"
7 #include "ui/events/test/test_event_target.h"
9 namespace ui {
10 namespace test {
12 TestEventTargeter::TestEventTargeter(TestEventTarget* initial_target,
13 bool should_bubble)
14 : target_(initial_target), should_bubble_(should_bubble) {
17 TestEventTargeter::~TestEventTargeter() {
20 void TestEventTargeter::set_target(TestEventTarget* target) {
21 target_ = target;
24 EventTarget* TestEventTargeter::FindTargetForEvent(EventTarget* root,
25 Event* event) {
26 return target_;
29 EventTarget* TestEventTargeter::FindNextBestTarget(EventTarget* previous_target,
30 Event* event) {
31 if (!should_bubble_)
32 return nullptr;
33 return previous_target->GetParentTarget();
36 } // namespace test
37 } // namespace ui