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

Side by Side Diff: chrome/browser/chromeos/events/xinput_hierarchy_changed_event_listener.h

Issue 223483002: base: Do not allow MessagePumpObservers to consume events. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tot-merge-r262009 Created 6 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 | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENER_H _ 5 #ifndef CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENER_H _
6 #define CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENER_H _ 6 #define CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENER_H _
7 7
8 #include "base/memory/singleton.h" 8 #include "base/memory/singleton.h"
9 #include "base/message_loop/message_loop.h" 9 #include "base/message_loop/message_loop.h"
10 #include "base/observer_list.h" 10 #include "base/observer_list.h"
(...skipping 19 matching lines...) Expand all
30 30
31 private: 31 private:
32 // Defines the delete on exit Singleton traits we like. Best to have this 32 // Defines the delete on exit Singleton traits we like. Best to have this
33 // and const/dest private as recommended for Singletons. 33 // and const/dest private as recommended for Singletons.
34 friend struct DefaultSingletonTraits<XInputHierarchyChangedEventListener>; 34 friend struct DefaultSingletonTraits<XInputHierarchyChangedEventListener>;
35 35
36 XInputHierarchyChangedEventListener(); 36 XInputHierarchyChangedEventListener();
37 virtual ~XInputHierarchyChangedEventListener(); 37 virtual ~XInputHierarchyChangedEventListener();
38 38
39 // MessageLoopForUI::Observer overrides. 39 // MessageLoopForUI::Observer overrides.
40 virtual base::EventStatus WillProcessEvent( 40 virtual void WillProcessEvent(const base::NativeEvent& event) OVERRIDE;
41 const base::NativeEvent& event) OVERRIDE;
42 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE; 41 virtual void DidProcessEvent(const base::NativeEvent& event) OVERRIDE;
43 42
44 // Returns true if the event was processed, false otherwise. 43 // Returns true if the event was processed, false otherwise.
45 void ProcessedXEvent(XEvent* xevent); 44 void ProcessedXEvent(XEvent* xevent);
46 45
47 // Notify observers that a device has been added/removed. 46 // Notify observers that a device has been added/removed.
48 void NotifyDeviceHierarchyChanged(); 47 void NotifyDeviceHierarchyChanged();
49 48
50 bool stopped_; 49 bool stopped_;
51 50
52 ObserverList<DeviceHierarchyObserver> observer_list_; 51 ObserverList<DeviceHierarchyObserver> observer_list_;
53 52
54 DISALLOW_COPY_AND_ASSIGN(XInputHierarchyChangedEventListener); 53 DISALLOW_COPY_AND_ASSIGN(XInputHierarchyChangedEventListener);
55 }; 54 };
56 55
57 } // namespace chromeos 56 } // namespace chromeos
58 57
59 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENE R_H_ 58 #endif // CHROME_BROWSER_CHROMEOS_EVENTS_XINPUT_HIERARCHY_CHANGED_EVENT_LISTENE R_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698