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

Side by Side Diff: chrome/browser/chrome_browser_application_mac.mm

Issue 2545823002: Store the NSEvent.description in a crash key in -[BrowserCrApplication sendEvent:]. (Closed)
Patch Set: Created 4 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 | chrome/common/crash_keys.h » ('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 #import "chrome/browser/chrome_browser_application_mac.h" 5 #import "chrome/browser/chrome_browser_application_mac.h"
6 6
7 #include <AvailabilityMacros.h> 7 #include <AvailabilityMacros.h>
8 #include <objc/objc-exception.h> 8 #include <objc/objc-exception.h>
9 9
10 #import "base/auto_reset.h" 10 #import "base/auto_reset.h"
(...skipping 333 matching lines...) Expand 10 before | Expand all | Expand 10 after
344 344
345 - (BOOL)isHandlingSendEvent { 345 - (BOOL)isHandlingSendEvent {
346 return handlingSendEvent_; 346 return handlingSendEvent_;
347 } 347 }
348 348
349 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent { 349 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent {
350 handlingSendEvent_ = handlingSendEvent; 350 handlingSendEvent_ = handlingSendEvent;
351 } 351 }
352 352
353 - (void)sendEvent:(NSEvent*)event { 353 - (void)sendEvent:(NSEvent*)event {
354 base::debug::ScopedCrashKey crash_key(
355 crash_keys::mac::kNSEvent, base::SysNSStringToUTF8([event description]));
356
354 base::mac::CallWithEHFrame(^{ 357 base::mac::CallWithEHFrame(^{
355 switch (event.type) { 358 switch (event.type) {
356 case NSLeftMouseDown: 359 case NSLeftMouseDown:
357 case NSRightMouseDown: { 360 case NSRightMouseDown: {
358 // In kiosk mode, we want to prevent context menus from appearing, 361 // In kiosk mode, we want to prevent context menus from appearing,
359 // so simply discard menu-generating events instead of passing them 362 // so simply discard menu-generating events instead of passing them
360 // along. 363 // along.
361 bool kioskMode = base::CommandLine::ForCurrentProcess()->HasSwitch( 364 bool kioskMode = base::CommandLine::ForCurrentProcess()->HasSwitch(
362 switches::kKioskMode); 365 switches::kKioskMode);
363 bool ctrlDown = [event modifierFlags] & NSControlKeyMask; 366 bool ctrlDown = [event modifierFlags] & NSControlKeyMask;
(...skipping 25 matching lines...) Expand all
389 - (void)_cycleWindowsReversed:(BOOL)arg1 { 392 - (void)_cycleWindowsReversed:(BOOL)arg1 {
390 base::AutoReset<BOOL> pin(&cyclingWindows_, YES); 393 base::AutoReset<BOOL> pin(&cyclingWindows_, YES);
391 [super _cycleWindowsReversed:arg1]; 394 [super _cycleWindowsReversed:arg1];
392 } 395 }
393 396
394 - (BOOL)isCyclingWindows { 397 - (BOOL)isCyclingWindows {
395 return cyclingWindows_; 398 return cyclingWindows_;
396 } 399 }
397 400
398 @end 401 @end
OLDNEW
« no previous file with comments | « no previous file | chrome/common/crash_keys.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698