Change to let media_stream_devices_controller.cc decide if a gUM request fail if...
[chromium-blink-merge.git] / ui / events / event_processor.cc
blob1a50d2b7411221c63dc14b376f499102f259896e
1 // Copyright 2013 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/event_processor.h"
7 #include "ui/events/event_target.h"
8 #include "ui/events/event_targeter.h"
10 namespace ui {
12 EventDispatchDetails EventProcessor::OnEventFromSource(Event* event) {
13 EventTarget* root = GetRootTarget();
14 CHECK(root);
15 EventTargeter* targeter = root->GetEventTargeter();
16 CHECK(targeter);
17 PrepareEventForDispatch(event);
18 EventTarget* target = targeter->FindTargetForEvent(root, event);
19 if (!target)
20 return EventDispatchDetails();
22 return DispatchEvent(target, event);
25 void EventProcessor::PrepareEventForDispatch(Event* event) {
28 } // namespace ui