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

Side by Side Diff: mojo/services/window_manager/view_event_dispatcher.h

Issue 1049993002: Get mojo_shell building inside chromium checkout. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix presubmit Created 5 years, 8 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
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 #ifndef SERVICES_WINDOW_MANAGER_VIEW_EVENT_DISPATCHER_H_
6 #define SERVICES_WINDOW_MANAGER_VIEW_EVENT_DISPATCHER_H_
7
8 #include "base/memory/scoped_ptr.h"
9 #include "ui/events/event_processor.h"
10 #include "ui/events/event_target.h"
11
12 namespace window_manager {
13
14 class ViewTarget;
15
16 class ViewEventDispatcher : public ui::EventProcessor {
17 public:
18 ViewEventDispatcher();
19 ~ViewEventDispatcher() override;
20
21 void SetRootViewTarget(ViewTarget* root_view_target);
22
23 private:
24 // Overridden from ui::EventProcessor:
25 ui::EventTarget* GetRootTarget() override;
26 void OnEventProcessingStarted(ui::Event* event) override;
27
28 // Overridden from ui::EventDispatcherDelegate.
29 bool CanDispatchToTarget(ui::EventTarget* target) override;
30 ui::EventDispatchDetails PreDispatchEvent(ui::EventTarget* target,
31 ui::Event* event) override;
32 ui::EventDispatchDetails PostDispatchEvent(
33 ui::EventTarget* target, const ui::Event& event) override;
34
35 // We keep a weak reference to ViewTarget*, which corresponds to the root of
36 // the mojo::View tree.
37 ViewTarget* root_view_target_;
38
39 ViewTarget* event_dispatch_target_;
40 ViewTarget* old_dispatch_target_;
41
42 DISALLOW_COPY_AND_ASSIGN(ViewEventDispatcher);
43 };
44
45 } // namespace window_manager
46
47 #endif // SERVICES_WINDOW_MANAGER_VIEW_EVENT_DISPATCHER_H_
OLDNEW
« no previous file with comments | « mojo/services/window_manager/run_all_unittests.cc ('k') | mojo/services/window_manager/view_event_dispatcher.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698