Home | History | Annotate | Download | only in aura
      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
      3 // found in the LICENSE file.
      4 
      5 #include "base/basictypes.h"
      6 #include "base/compiler_specific.h"
      7 #include "base/message_loop/message_loop.h"
      8 
      9 namespace aura {
     10 
     11 class DispatcherWin : public base::MessageLoop::Dispatcher {
     12  public:
     13   DispatcherWin() {}
     14   virtual ~DispatcherWin() {}
     15 
     16   // Overridden from MessageLoop::Dispatcher:
     17   virtual bool Dispatch(const base::NativeEvent& event) OVERRIDE;
     18 
     19  private:
     20   DISALLOW_COPY_AND_ASSIGN(DispatcherWin);
     21 };
     22 
     23 bool DispatcherWin::Dispatch(const base::NativeEvent& msg) {
     24   TranslateMessage(&msg);
     25   DispatchMessage(&msg);
     26   return true;
     27 }
     28 
     29 base::MessageLoop::Dispatcher* CreateDispatcher() {
     30   return new DispatcherWin;
     31 }
     32 
     33 }  // namespace aura
     34