Home | History | Annotate | Download | only in chromeos
      1 // Copyright (c) 2011 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 #include "chrome/browser/chromeos/xinput_hierarchy_changed_event_listener.h"
      6 
      7 namespace chromeos {
      8 
      9 void XInputHierarchyChangedEventListener::Init() {
     10   base::MessageLoopForUI::current()->AddObserver(this);
     11 }
     12 
     13 void XInputHierarchyChangedEventListener::StopImpl() {
     14   base::MessageLoopForUI::current()->RemoveObserver(this);
     15 }
     16 
     17 base::EventStatus XInputHierarchyChangedEventListener::WillProcessEvent(
     18     const base::NativeEvent& event) {
     19   // There may be multiple listeners for the XI_HierarchyChanged event. So
     20   // always return EVENT_CONTINUE to make sure all the listeners receive the
     21   // event.
     22   ProcessedXEvent(event);
     23   return base::EVENT_CONTINUE;
     24 }
     25 
     26 void XInputHierarchyChangedEventListener::DidProcessEvent(
     27     const base::NativeEvent& event) {
     28 }
     29 
     30 }  // namespace chromeos
     31