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

Side by Side Diff: ui/views/focus/accelerator_handler_aura.cc

Issue 9958152: Consolidate win/x dispatchers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: cleanup Created 8 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) 2011 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/views/focus/accelerator_handler.h" 5 #include "ui/views/focus/accelerator_handler.h"
6 6
7 namespace views { 7 namespace views {
8 8
9 AcceleratorHandler::AcceleratorHandler() { 9 AcceleratorHandler::AcceleratorHandler() {
10 } 10 }
11 11
12 base::DispatchStatus AcceleratorHandler::Dispatch(
13 const base::NativeEvent& event) {
12 #if defined(OS_WIN) 14 #if defined(OS_WIN)
13 bool AcceleratorHandler::Dispatch(const MSG& msg) { 15 TranslateMessage(&event);
14 TranslateMessage(&msg); 16 DispatchMessage(&event);
15 DispatchMessage(&msg); 17 return base::EVENT_PROCESSED;
16 return true;
17 }
18 #else 18 #else
19 base::MessagePumpDispatcher::DispatchStatus AcceleratorHandler::Dispatch( 19 return base::EVENT_IGNORED;
20 XEvent*) { 20 #endif // defined(OS_WIN)
21 return base::MessagePumpDispatcher::EVENT_IGNORED;
22 } 21 }
23 22
23 #if !defined(OS_WIN)
24 bool DispatchXEvent(XEvent* xev) { 24 bool DispatchXEvent(XEvent* xev) {
25 return false; 25 return false;
26 } 26 }
27 #endif // defined(OS_WIN) 27 #endif // !defined(OS_WIN)
28 28
29 } // namespace views 29 } // namespace views
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698