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

Side by Side Diff: ui/events/ozone/evdev/event_factory_evdev.h

Issue 291473002: ozone: Initialize a subsystem only if necessary. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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 | Annotate | Revision Log
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 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 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 5 #ifndef UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 6 #define UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
7 7
8 #include "base/callback.h" 8 #include "base/callback.h"
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/files/file_path.h" 10 #include "base/files/file_path.h"
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after
45 scoped_ptr<EventConverterEvdev> converter); 45 scoped_ptr<EventConverterEvdev> converter);
46 46
47 // Close device at path (on UI thread). 47 // Close device at path (on UI thread).
48 void DetachInputDevice(const base::FilePath& file_path); 48 void DetachInputDevice(const base::FilePath& file_path);
49 49
50 // DeviceEventObserver overrides: 50 // DeviceEventObserver overrides:
51 // 51 //
52 // Callback for device add (on UI thread). 52 // Callback for device add (on UI thread).
53 virtual void OnDeviceEvent(const DeviceEvent& event) OVERRIDE; 53 virtual void OnDeviceEvent(const DeviceEvent& event) OVERRIDE;
54 54
55 // PlatformEventSource:
56 virtual void OnDispatcherListChanged() OVERRIDE;
57
55 // Owned per-device event converters (by path). 58 // Owned per-device event converters (by path).
56 std::map<base::FilePath, EventConverterEvdev*> converters_; 59 std::map<base::FilePath, EventConverterEvdev*> converters_;
57 60
58 // Interface for scanning & monitoring input devices. 61 // Interface for scanning & monitoring input devices.
59 DeviceManager* device_manager_; // Not owned. 62 DeviceManager* device_manager_; // Not owned.
60 63
61 // True if this was registered with |device_manager_|. This is needed since 64 // True if this was registered with |device_manager_|. This is needed since
62 // StartProcessingEvents() is called multiple times (when a 65 // StartProcessingEvents() is called multiple times (when a
63 // WindowTreeHostOzone is created) but we shouldn't register this multiple 66 // WindowTreeHostOzone is created) but we shouldn't register this multiple
64 // times. 67 // times.
(...skipping 15 matching lines...) Expand all
80 83
81 // Support weak pointers for attach & detach callbacks. 84 // Support weak pointers for attach & detach callbacks.
82 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_; 85 base::WeakPtrFactory<EventFactoryEvdev> weak_ptr_factory_;
83 86
84 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev); 87 DISALLOW_COPY_AND_ASSIGN(EventFactoryEvdev);
85 }; 88 };
86 89
87 } // namespace ui 90 } // namespace ui
88 91
89 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_ 92 #endif // UI_EVENTS_OZONE_EVDEV_EVENT_FACTORY_EVDEV_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698