Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(145)

Side by Side Diff: services/window_manager/view_event_dispatcher.cc

Issue 1531403003: Delete the ViewManager and WindowManager services. (Closed) Base URL: git@github.com:domokit/mojo.git@moz-3
Patch Set: rebase Created 4 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « services/window_manager/view_event_dispatcher.h ('k') | services/window_manager/view_target.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2014 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.
4
5 #include "services/window_manager/view_event_dispatcher.h"
6
7 #include "mojo/services/view_manager/cpp/view.h"
8 #include "services/window_manager/view_target.h"
9
10 namespace window_manager {
11
12 ViewEventDispatcher::ViewEventDispatcher()
13 : event_dispatch_target_(nullptr),
14 old_dispatch_target_(nullptr) {
15 }
16
17 ViewEventDispatcher::~ViewEventDispatcher() {}
18
19 void ViewEventDispatcher::SetRootViewTarget(ViewTarget* root_view_target) {
20 root_view_target_ = root_view_target;
21 }
22
23 ui::EventTarget* ViewEventDispatcher::GetRootTarget() {
24 return root_view_target_;
25 }
26
27 void ViewEventDispatcher::OnEventProcessingStarted(ui::Event* event) {
28 }
29
30 bool ViewEventDispatcher::CanDispatchToTarget(ui::EventTarget* target) {
31 return event_dispatch_target_ == target;
32 }
33
34 ui::EventDispatchDetails ViewEventDispatcher::PreDispatchEvent(
35 ui::EventTarget* target,
36 ui::Event* event) {
37 // TODO(erg): PreDispatch in aura::WindowEventDispatcher does many, many
38 // things. It, and the functions split off for different event types, are
39 // most of the file.
40 old_dispatch_target_ = event_dispatch_target_;
41 event_dispatch_target_ = static_cast<ViewTarget*>(target);
42 return ui::EventDispatchDetails();
43 }
44
45 ui::EventDispatchDetails ViewEventDispatcher::PostDispatchEvent(
46 ui::EventTarget* target,
47 const ui::Event& event) {
48 // TODO(erg): Not at all as long as PreDispatchEvent, but still missing core
49 // details.
50 event_dispatch_target_ = old_dispatch_target_;
51 old_dispatch_target_ = nullptr;
52 return ui::EventDispatchDetails();
53 }
54
55 } // namespace window_manager
OLDNEW
« no previous file with comments | « services/window_manager/view_event_dispatcher.h ('k') | services/window_manager/view_target.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698