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 | |
622 // Prevents an autorelease pool from being created if the app is in the midst of | 619 // Prevents an autorelease pool from being created if the app is in the midst of |
623 // handling a UI event because various parts of AppKit depend on objects that | 620 // handling a UI event because various parts of AppKit depend on objects that |
624 // are created while handling a UI event to be autoreleased in the event loop. | 621 // are created while handling a UI event to be autoreleased in the event loop. |
625 // An example of this is NSWindowController. When a window with a window | 622 // An example of this is NSWindowController. When a window with a window |
626 // controller is closed it goes through a stack like this: | 623 // controller is closed it goes through a stack like this: |
627 // (Several stack frames elided for clarity) | 624 // (Several stack frames elided for clarity) |
628 // | 625 // |
629 // #0 [NSWindowController autorelease] | 626 // #0 [NSWindowController autorelease] |
630 // #1 DoAClose | 627 // #1 DoAClose |
631 // #2 MessagePumpCFRunLoopBase::DoWork() | 628 // #2 MessagePumpCFRunLoopBase::DoWork() |
(...skipping 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
695 [NSApplication sharedApplication]; | 692 [NSApplication sharedApplication]; |
696 g_not_using_cr_app = true; | 693 g_not_using_cr_app = true; |
697 return new MessagePumpNSApplication; | 694 return new MessagePumpNSApplication; |
698 #endif | 695 #endif |
699 } | 696 } |
700 | 697 |
701 return new MessagePumpNSRunLoop; | 698 return new MessagePumpNSRunLoop; |
702 } | 699 } |
703 | 700 |
704 } // namespace base | 701 } // namespace base |
OLD | NEW |