OLD | NEW |
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 #import "chrome/browser/chrome_browser_application_mac.h" | 5 #import "chrome/browser/chrome_browser_application_mac.h" |
6 | 6 |
7 #include <objc/objc-exception.h> | 7 #include <objc/objc-exception.h> |
8 | 8 |
9 #import "base/auto_reset.h" | 9 #import "base/auto_reset.h" |
10 #include "base/command_line.h" | 10 #include "base/command_line.h" |
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
331 // In kiosk mode, we want to prevent context menus from appearing, | 331 // In kiosk mode, we want to prevent context menus from appearing, |
332 // so simply discard menu-generating events instead of passing them | 332 // so simply discard menu-generating events instead of passing them |
333 // along. | 333 // along. |
334 bool kioskMode = base::CommandLine::ForCurrentProcess()->HasSwitch( | 334 bool kioskMode = base::CommandLine::ForCurrentProcess()->HasSwitch( |
335 switches::kKioskMode); | 335 switches::kKioskMode); |
336 bool ctrlDown = [event modifierFlags] & NSControlKeyMask; | 336 bool ctrlDown = [event modifierFlags] & NSControlKeyMask; |
337 if (kioskMode && ([event type] == NSRightMouseDown || ctrlDown)) | 337 if (kioskMode && ([event type] == NSRightMouseDown || ctrlDown)) |
338 break; | 338 break; |
339 } | 339 } |
340 | 340 |
| 341 case NSKeyDown: |
| 342 NSLog(@"%@", event); |
| 343 // fallthrough. |
| 344 |
341 default: { | 345 default: { |
342 base::mac::ScopedSendingEvent sendingEventScoper; | 346 base::mac::ScopedSendingEvent sendingEventScoper; |
343 [super sendEvent:event]; | 347 [super sendEvent:event]; |
344 } | 348 } |
345 } | 349 } |
346 }); | 350 }); |
347 } | 351 } |
348 | 352 |
349 - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { | 353 - (void)accessibilitySetValue:(id)value forAttribute:(NSString*)attribute { |
350 // This is an undocument attribute that's set when VoiceOver is turned on/off. | 354 // This is an undocument attribute that's set when VoiceOver is turned on/off. |
(...skipping 11 matching lines...) Expand all Loading... |
362 - (void)_cycleWindowsReversed:(BOOL)arg1 { | 366 - (void)_cycleWindowsReversed:(BOOL)arg1 { |
363 base::AutoReset<BOOL> pin(&cyclingWindows_, YES); | 367 base::AutoReset<BOOL> pin(&cyclingWindows_, YES); |
364 [super _cycleWindowsReversed:arg1]; | 368 [super _cycleWindowsReversed:arg1]; |
365 } | 369 } |
366 | 370 |
367 - (BOOL)isCyclingWindows { | 371 - (BOOL)isCyclingWindows { |
368 return cyclingWindows_; | 372 return cyclingWindows_; |
369 } | 373 } |
370 | 374 |
371 @end | 375 @end |
OLD | NEW |