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

Side by Side Diff: ash/accelerators/accelerator_dispatcher.cc

Issue 10155015: Process all global shortcuts for Ash after InputMethodEventFilter (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase, address comments 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) 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 "ash/accelerators/accelerator_dispatcher.h" 5 #include "ash/accelerators/accelerator_dispatcher.h"
6 6
7 #if defined(USE_X11) 7 #if defined(USE_X11)
8 #include <X11/Xlib.h> 8 #include <X11/Xlib.h>
9 9
10 // Xlib defines RootWindow 10 // Xlib defines RootWindow
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after
74 if (IsKeyEvent(event)) { 74 if (IsKeyEvent(event)) {
75 ash::AcceleratorController* accelerator_controller = 75 ash::AcceleratorController* accelerator_controller =
76 ash::Shell::GetInstance()->accelerator_controller(); 76 ash::Shell::GetInstance()->accelerator_controller();
77 if (accelerator_controller) { 77 if (accelerator_controller) {
78 ui::Accelerator accelerator(ui::KeyboardCodeFromNative(event), 78 ui::Accelerator accelerator(ui::KeyboardCodeFromNative(event),
79 ui::EventFlagsFromNative(event) & kModifierMask); 79 ui::EventFlagsFromNative(event) & kModifierMask);
80 if (IsKeyRelease(event)) 80 if (IsKeyRelease(event))
81 accelerator.set_type(ui::ET_KEY_RELEASED); 81 accelerator.set_type(ui::ET_KEY_RELEASED);
82 if (accelerator_controller->Process(accelerator)) 82 if (accelerator_controller->Process(accelerator))
83 return true; 83 return true;
84 accelerator.set_type(aura::TranslatedKeyEvent(event, false).type());
85 if (accelerator_controller->Process(accelerator))
86 return true;
87 } 84 }
88 } 85 }
89 86
90 return nested_dispatcher_->Dispatch(event); 87 return nested_dispatcher_->Dispatch(event);
91 } 88 }
92 89
93 } // namespace ash 90 } // namespace ash
OLDNEW
« no previous file with comments | « ash/accelerators/accelerator_controller_unittest.cc ('k') | ash/accelerators/accelerator_filter.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698