OLD | NEW |
---|---|
(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 CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_CONTROLLER_H_ | |
6 #define CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_CONTROLLER_H_ | |
7 | |
8 #include <list> | |
9 | |
10 #include "ui/aura/env_observer.h" | |
11 #include "ui/events/event_rewriter.h" | |
12 | |
13 namespace ui { | |
14 class EventSource; | |
15 } // namespace ui | |
16 | |
17 namespace chromeos { | |
18 | |
19 class EventRewriterController : public aura::EnvObserver { | |
sadrul
2014/04/22 16:07:04
Add doc comments
| |
20 public: | |
21 explicit EventRewriterController(ui::EventRewriter* rewriter); | |
Daniel Erat
2014/04/18 02:50:06
change the argument to a scoped_ptr to make it obv
| |
22 ~EventRewriterController(); | |
Daniel Erat
2014/04/18 02:50:06
virtual
| |
23 | |
24 void Init(); | |
25 | |
26 // aura::EnvObserver overrides: | |
27 virtual void OnWindowInitialized(aura::Window* window) OVERRIDE {} | |
28 virtual void OnHostInitialized(aura::WindowTreeHost* host) OVERRIDE; | |
29 | |
30 private: | |
31 typedef std::list<ui::EventSource*> EventSourceList; | |
32 | |
33 void AddToEventSource(ui::EventSource* source); | |
34 | |
35 // The |EventRewriter| managed by this controller. | |
36 scoped_ptr<ui::EventRewriter> rewriter_; | |
37 | |
38 // |EventSource|s to which the rewriter has been added. | |
39 EventSourceList event_sources_; | |
sadrul
2014/04/22 16:07:04
I assume you keep this list so that you can remove
| |
40 | |
41 DISALLOW_COPY_AND_ASSIGN(EventRewriterController); | |
42 }; | |
43 | |
44 } // namespace chromeos | |
45 | |
46 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_EVENT_REWRITER_CONTROLLER_H_ | |
OLD | NEW |