Index: base/chrome_application_mac.h |
=================================================================== |
--- base/chrome_application_mac.h (revision 30994) |
+++ base/chrome_application_mac.h (working copy) |
@@ -2,41 +2,39 @@ |
// Use of this source code is governed by a BSD-style license that can be |
// found in the LICENSE file. |
-#ifndef CHROME_BROWSER_CHROME_APPLICATION_MAC_H_ |
-#define CHROME_BROWSER_CHROME_APPLICATION_MAC_H_ |
+#ifndef BASE_CHROME_APPLICATION_MAC_H_ |
+#define BASE_CHROME_APPLICATION_MAC_H_ |
-#ifdef __OBJC__ |
- |
#import <AppKit/AppKit.h> |
-@interface CrApplication : NSApplication |
-@end |
+#include "base/basictypes.h" |
-// Namespace for exception-reporting helper functions. Exposed for |
-// testing purposes. |
-namespace CrApplicationNSException { |
+@interface CrApplication : NSApplication { |
+ @private |
+ BOOL handlingSendEvent_; |
+} |
+@property(readonly, |
+ getter=isHandlingSendEvent, |
+ nonatomic) BOOL handlingSendEvent; |
-// Bin for unknown exceptions. |
-extern const size_t kUnknownNSException; |
++ (NSApplication*)sharedApplication; |
+@end |
-// Returns the histogram bin for |exception| if it is one we track |
-// specifically, or |kUnknownNSException| if unknown. |
-size_t BinForException(NSException* exception); |
+namespace chrome_application_mac { |
-// Use UMA to track exception occurance. |
-void RecordExceptionWithUma(NSException* exception); |
+// Controls the state of |handlingSendEvent_| in the event loop so that it is |
+// reset properly. |
+class ScopedSendingEvent { |
+ public: |
+ explicit ScopedSendingEvent(CrApplication* app); |
+ ~ScopedSendingEvent(); |
-} // CrApplicationNSException |
+ private: |
+ CrApplication* app_; |
+ BOOL handling_; |
+ DISALLOW_COPY_AND_ASSIGN(ScopedSendingEvent); |
+}; |
-#endif // __OBJC__ |
+} // chrome_application_mac |
-// CrApplicationCC provides access to CrApplication Objective-C selectors from |
-// C++ code. |
-namespace CrApplicationCC { |
- |
-// Calls -[NSApp terminate:]. |
-void Terminate(); |
- |
-} // namespace CrApplicationCC |
- |
-#endif // CHROME_BROWSER_CHROME_APPLICATION_MAC_H_ |
+#endif // BASE_CHROME_APPLICATION_MAC_H_ |