| 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 "base/message_loop/message_pump_mac.h" | 5 #import "base/message_loop/message_pump_mac.h" |
| 6 | 6 |
| 7 #import <Foundation/Foundation.h> | 7 #import <Foundation/Foundation.h> |
| 8 | 8 |
| 9 #include <limits> | 9 #include <limits> |
| 10 | 10 |
| (...skipping 598 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 context:NULL | 609 context:NULL |
| 610 subtype:0 | 610 subtype:0 |
| 611 data1:0 | 611 data1:0 |
| 612 data2:0] | 612 data2:0] |
| 613 atStart:NO]; | 613 atStart:NO]; |
| 614 } | 614 } |
| 615 | 615 |
| 616 MessagePumpCrApplication::MessagePumpCrApplication() { | 616 MessagePumpCrApplication::MessagePumpCrApplication() { |
| 617 } | 617 } |
| 618 | 618 |
| 619 MessagePumpCrApplication::~MessagePumpCrApplication() { |
| 620 } |
| 621 |
| 619 // Prevents an autorelease pool from being created if the app is in the midst of | 622 // Prevents an autorelease pool from being created if the app is in the midst of |
| 620 // handling a UI event because various parts of AppKit depend on objects that | 623 // handling a UI event because various parts of AppKit depend on objects that |
| 621 // are created while handling a UI event to be autoreleased in the event loop. | 624 // are created while handling a UI event to be autoreleased in the event loop. |
| 622 // An example of this is NSWindowController. When a window with a window | 625 // An example of this is NSWindowController. When a window with a window |
| 623 // controller is closed it goes through a stack like this: | 626 // controller is closed it goes through a stack like this: |
| 624 // (Several stack frames elided for clarity) | 627 // (Several stack frames elided for clarity) |
| 625 // | 628 // |
| 626 // #0 [NSWindowController autorelease] | 629 // #0 [NSWindowController autorelease] |
| 627 // #1 DoAClose | 630 // #1 DoAClose |
| 628 // #2 MessagePumpCFRunLoopBase::DoWork() | 631 // #2 MessagePumpCFRunLoopBase::DoWork() |
| (...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 692 [NSApplication sharedApplication]; | 695 [NSApplication sharedApplication]; |
| 693 g_not_using_cr_app = true; | 696 g_not_using_cr_app = true; |
| 694 return new MessagePumpNSApplication; | 697 return new MessagePumpNSApplication; |
| 695 #endif | 698 #endif |
| 696 } | 699 } |
| 697 | 700 |
| 698 return new MessagePumpNSRunLoop; | 701 return new MessagePumpNSRunLoop; |
| 699 } | 702 } |
| 700 | 703 |
| 701 } // namespace base | 704 } // namespace base |
| OLD | NEW |