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

Side by Side Diff: ui/aura/device_list_updater_aurax11.cc

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
« no previous file with comments | « ui/aura/device_list_updater_aurax11.h ('k') | ui/aura/test/ui_controls_factory_aurax11.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "ui/aura/device_list_updater_aurax11.h" 5 #include "ui/aura/device_list_updater_aurax11.h"
6 6
7 #include <X11/extensions/XInput2.h> 7 #include <X11/extensions/XInput2.h>
8 8
9 #include "ui/events/event_utils.h" 9 #include "ui/events/event_utils.h"
10 10
11 namespace aura { 11 namespace aura {
12 12
13 DeviceListUpdaterAuraX11::DeviceListUpdaterAuraX11() {} 13 DeviceListUpdaterAuraX11::DeviceListUpdaterAuraX11() {}
14 14
15 DeviceListUpdaterAuraX11::~DeviceListUpdaterAuraX11() {} 15 DeviceListUpdaterAuraX11::~DeviceListUpdaterAuraX11() {}
16 16
17 base::EventStatus DeviceListUpdaterAuraX11::WillProcessEvent( 17 void DeviceListUpdaterAuraX11::WillProcessEvent(
18 const base::NativeEvent& event) { 18 const base::NativeEvent& event) {
19 // XI_HierarchyChanged events are special. There is no window associated with 19 // XI_HierarchyChanged events are special. There is no window associated with
20 // these events. So process them directly from here. 20 // these events. So process them directly from here.
21 if (event->type == GenericEvent && 21 if (event->type == GenericEvent &&
22 event->xgeneric.evtype == XI_HierarchyChanged) { 22 event->xgeneric.evtype == XI_HierarchyChanged) {
23 ui::UpdateDeviceList(); 23 ui::UpdateDeviceList();
24 } 24 }
25
26 return base::EVENT_CONTINUE;
27 } 25 }
28 26
29 void DeviceListUpdaterAuraX11::DidProcessEvent(const base::NativeEvent& event) { 27 void DeviceListUpdaterAuraX11::DidProcessEvent(const base::NativeEvent& event) {
30 } 28 }
31 29
32 } // namespace aura 30 } // namespace aura
OLDNEW
« no previous file with comments | « ui/aura/device_list_updater_aurax11.h ('k') | ui/aura/test/ui_controls_factory_aurax11.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698