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 #ifndef BASE_MAC_SCOPED_SENDING_EVENT_H_ | 5 #ifndef BASE_MAC_SCOPED_SENDING_EVENT_H_ |
6 #define BASE_MAC_SCOPED_SENDING_EVENT_H_ | 6 #define BASE_MAC_SCOPED_SENDING_EVENT_H_ |
7 | 7 |
8 #include "base/base_export.h" | 8 #include "base/base_export.h" |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "base/mac/scoped_nsobject.h" | |
11 #include "base/message_loop/message_pump_mac.h" | 10 #include "base/message_loop/message_pump_mac.h" |
12 | 11 |
13 // Nested event loops can pump IPC messages, including | 12 // Nested event loops can pump IPC messages, including |
14 // script-initiated tab closes, which could release objects that the | 13 // script-initiated tab closes, which could release objects that the |
15 // nested event loop might message. CrAppProtocol defines how to ask | 14 // nested event loop might message. CrAppProtocol defines how to ask |
16 // the embedding NSApplication subclass if an event is currently being | 15 // the embedding NSApplication subclass if an event is currently being |
17 // handled, in which case such closes are deferred to the top-level | 16 // handled, in which case such closes are deferred to the top-level |
18 // event loop. | 17 // event loop. |
19 // | 18 // |
20 // ScopedSendingEvent allows script-initiated event loops to work like | 19 // ScopedSendingEvent allows script-initiated event loops to work like |
(...skipping 19 matching lines...) Expand all Loading... |
40 NSObject<CrAppControlProtocol>* app_; | 39 NSObject<CrAppControlProtocol>* app_; |
41 BOOL handling_; // Value of -[app_ handlingSendEvent] at construction. | 40 BOOL handling_; // Value of -[app_ handlingSendEvent] at construction. |
42 | 41 |
43 DISALLOW_COPY_AND_ASSIGN(ScopedSendingEvent); | 42 DISALLOW_COPY_AND_ASSIGN(ScopedSendingEvent); |
44 }; | 43 }; |
45 | 44 |
46 } // namespace mac | 45 } // namespace mac |
47 } // namespace base | 46 } // namespace base |
48 | 47 |
49 #endif // BASE_MAC_SCOPED_SENDING_EVENT_H_ | 48 #endif // BASE_MAC_SCOPED_SENDING_EVENT_H_ |
OLD | NEW |