summaryrefslogtreecommitdiffstats
path: root/ui/aura/dispatcher_win.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ui/aura/dispatcher_win.cc')
-rw-r--r--ui/aura/dispatcher_win.cc34
1 files changed, 34 insertions, 0 deletions
diff --git a/ui/aura/dispatcher_win.cc b/ui/aura/dispatcher_win.cc
new file mode 100644
index 0000000..f8a4232
--- /dev/null
+++ b/ui/aura/dispatcher_win.cc
@@ -0,0 +1,34 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "base/basictypes.h"
+#include "base/compiler_specific.h"
+#include "base/message_loop.h"
+#include "ui/aura/root_window.h"
+
+namespace aura {
+
+class DispatcherWin : public MessageLoop::Dispatcher {
+ public:
+ DispatcherWin() {}
+ virtual ~DispatcherWin() {}
+
+ // Overridden from MessageLoop::Dispatcher:
+ virtual bool Dispatch(const MSG& msg) OVERRIDE;
+
+ private:
+ DISALLOW_COPY_AND_ASSIGN(DispatcherWin);
+};
+
+bool DispatcherWin::Dispatch(const MSG& msg) {
+ TranslateMessage(&msg);
+ DispatchMessage(&msg);
+ return true;
+}
+
+MessageLoop::Dispatcher* CreateDispatcher() {
+ return new DispatcherWin;
+}
+
+} // namespace aura