| 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 #include "base/debug/crash_logging.h" | 8 #include "base/debug/crash_logging.h" |
| 9 #include "base/debug/stack_trace.h" | 9 #include "base/debug/stack_trace.h" |
| 10 #import "base/logging.h" | 10 #import "base/logging.h" |
| (...skipping 388 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 399 // exceptions and Chromium cannot fix them. This provides a way to | 399 // exceptions and Chromium cannot fix them. This provides a way to |
| 400 // work around those on a spot basis. | 400 // work around those on a spot basis. |
| 401 bool enableNSExceptions = false; | 401 bool enableNSExceptions = false; |
| 402 | 402 |
| 403 // http://crbug.com/80686 , an Epson printer driver. | 403 // http://crbug.com/80686 , an Epson printer driver. |
| 404 if (anAction == @selector(selectPDE:)) { | 404 if (anAction == @selector(selectPDE:)) { |
| 405 enableNSExceptions = true; | 405 enableNSExceptions = true; |
| 406 } | 406 } |
| 407 | 407 |
| 408 // Minimize the window by keeping this close to the super call. | 408 // Minimize the window by keeping this close to the super call. |
| 409 scoped_ptr<base::mac::ScopedNSExceptionEnabler> enabler(NULL); | 409 scoped_ptr<base::mac::ScopedNSExceptionEnabler> enabler; |
| 410 if (enableNSExceptions) | 410 if (enableNSExceptions) |
| 411 enabler.reset(new base::mac::ScopedNSExceptionEnabler()); | 411 enabler.reset(new base::mac::ScopedNSExceptionEnabler()); |
| 412 return [super sendAction:anAction to:aTarget from:sender]; | 412 return [super sendAction:anAction to:aTarget from:sender]; |
| 413 } | 413 } |
| 414 | 414 |
| 415 - (BOOL)isHandlingSendEvent { | 415 - (BOOL)isHandlingSendEvent { |
| 416 return handlingSendEvent_; | 416 return handlingSendEvent_; |
| 417 } | 417 } |
| 418 | 418 |
| 419 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent { | 419 - (void)setHandlingSendEvent:(BOOL)handlingSendEvent { |
| (...skipping 151 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 571 std::vector<NSWindow*>::iterator window_iterator = | 571 std::vector<NSWindow*>::iterator window_iterator = |
| 572 std::find(previousKeyWindows_.begin(), | 572 std::find(previousKeyWindows_.begin(), |
| 573 previousKeyWindows_.end(), | 573 previousKeyWindows_.end(), |
| 574 window); | 574 window); |
| 575 if (window_iterator != previousKeyWindows_.end()) { | 575 if (window_iterator != previousKeyWindows_.end()) { |
| 576 previousKeyWindows_.erase(window_iterator); | 576 previousKeyWindows_.erase(window_iterator); |
| 577 } | 577 } |
| 578 } | 578 } |
| 579 | 579 |
| 580 @end | 580 @end |
| OLD | NEW |