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

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

Issue 784823002: Pass through the CONVERT/NONCONVERT/HANKAKU_ZENKAKU keys. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Update unit tests to meets latest expectation. Created 6 years 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
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_controller.h" 5 #include "ash/accelerators/accelerator_controller.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <string> 9 #include <string>
10 10
(...skipping 1256 matching lines...) Expand 10 before | Expand all | Expand 10 after
1267 #else 1267 #else
1268 case DUMMY_FOR_RESERVED: 1268 case DUMMY_FOR_RESERVED:
1269 NOTREACHED(); 1269 NOTREACHED();
1270 break; 1270 break;
1271 #endif 1271 #endif
1272 } 1272 }
1273 } 1273 }
1274 1274
1275 bool AcceleratorController::ShouldActionConsumeKeyEvent( 1275 bool AcceleratorController::ShouldActionConsumeKeyEvent(
1276 AcceleratorAction action) { 1276 AcceleratorAction action) {
1277 if (action == NEXT_IME) { 1277 if (action == NEXT_IME || action == SWITCH_IME) {
1278 // NEXT_IME is bound to Alt-Shift key up event. To be consistent with 1278 // NEXT_IME is bound to Alt-Shift key up event. SWITCH_IME is bound to
1279 // Windows behavior, do not consume the key event here. 1279 // HANKAKU_ZENKAKU, HENKAN, MUHENKAN keys. To be consistent with Windows
1280 // behavior, do not consume the key event here.
1280 return false; 1281 return false;
1281 } 1282 }
1282 #if defined(OS_CHROMEOS) 1283 #if defined(OS_CHROMEOS)
1283 if (action == SILENCE_SPOKEN_FEEDBACK) 1284 if (action == SILENCE_SPOKEN_FEEDBACK)
1284 return false; 1285 return false;
1285 #endif 1286 #endif
1286 1287
1287 // Adding new exceptions is *STRONGLY* discouraged. 1288 // Adding new exceptions is *STRONGLY* discouraged.
1288 return true; 1289 return true;
1289 } 1290 }
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
1325 } 1326 }
1326 1327
1327 void AcceleratorController::SetKeyboardBrightnessControlDelegate( 1328 void AcceleratorController::SetKeyboardBrightnessControlDelegate(
1328 scoped_ptr<KeyboardBrightnessControlDelegate> 1329 scoped_ptr<KeyboardBrightnessControlDelegate>
1329 keyboard_brightness_control_delegate) { 1330 keyboard_brightness_control_delegate) {
1330 keyboard_brightness_control_delegate_ = 1331 keyboard_brightness_control_delegate_ =
1331 keyboard_brightness_control_delegate.Pass(); 1332 keyboard_brightness_control_delegate.Pass();
1332 } 1333 }
1333 1334
1334 } // namespace ash 1335 } // namespace ash
OLDNEW
« no previous file with comments | « no previous file | ash/accelerators/accelerator_controller_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698