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 #import "base/auto_reset.h" | 7 #import "base/auto_reset.h" |
8 #import "base/logging.h" | 8 #import "base/logging.h" |
9 #include "base/mac/crash_logging.h" | 9 #include "base/mac/crash_logging.h" |
10 #import "base/mac/scoped_nsexception_enabler.h" | 10 #import "base/mac/scoped_nsexception_enabler.h" |
(...skipping 371 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
382 if (tag == 0 || tag == -1) { | 382 if (tag == 0 || tag == -1) { |
383 tag = [sender selectedTag]; | 383 tag = [sender selectedTag]; |
384 } | 384 } |
385 } else if ([sender isKindOfClass:[NSMenuItem class]]) { | 385 } else if ([sender isKindOfClass:[NSMenuItem class]]) { |
386 tag = [sender tag]; | 386 tag = [sender tag]; |
387 } | 387 } |
388 | 388 |
389 NSString* actionString = NSStringFromSelector(anAction); | 389 NSString* actionString = NSStringFromSelector(anAction); |
390 NSString* value = | 390 NSString* value = |
391 [NSString stringWithFormat:@"%@ tag %d sending %@ to %p", | 391 [NSString stringWithFormat:@"%@ tag %d sending %@ to %p", |
392 [sender className], tag, actionString, aTarget]; | 392 [sender className], |
393 static_cast<int32_t>(tag), | |
Mark Mentovai
2012/08/20 13:25:58
The correct way to deal with NSInteger is a cast t
| |
394 actionString, | |
395 aTarget]; | |
393 | 396 |
394 base::mac::ScopedCrashKey key(kActionKey, value); | 397 base::mac::ScopedCrashKey key(kActionKey, value); |
395 | 398 |
396 // Certain third-party code, such as print drivers, can still throw | 399 // Certain third-party code, such as print drivers, can still throw |
397 // exceptions and Chromium cannot fix them. This provides a way to | 400 // exceptions and Chromium cannot fix them. This provides a way to |
398 // work around those on a spot basis. | 401 // work around those on a spot basis. |
399 bool enableNSExceptions = false; | 402 bool enableNSExceptions = false; |
400 | 403 |
401 // http://crbug.com/80686 , an Epson printer driver. | 404 // http://crbug.com/80686 , an Epson printer driver. |
402 if (anAction == @selector(selectPDE:)) { | 405 if (anAction == @selector(selectPDE:)) { |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
571 std::vector<NSWindow*>::iterator window_iterator = | 574 std::vector<NSWindow*>::iterator window_iterator = |
572 std::find(previousKeyWindows_.begin(), | 575 std::find(previousKeyWindows_.begin(), |
573 previousKeyWindows_.end(), | 576 previousKeyWindows_.end(), |
574 window); | 577 window); |
575 if (window_iterator != previousKeyWindows_.end()) { | 578 if (window_iterator != previousKeyWindows_.end()) { |
576 previousKeyWindows_.erase(window_iterator); | 579 previousKeyWindows_.erase(window_iterator); |
577 } | 580 } |
578 } | 581 } |
579 | 582 |
580 @end | 583 @end |
OLD | NEW |