Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2200)

Unified Diff: base/chrome_application_mac.h

Issue 345051: Cleans up our autorelease handling so that we don't create a layered ... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
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_
« no previous file with comments | « base/base.gyp ('k') | base/chrome_application_mac.mm » ('j') | base/message_pump_mac.mm » ('J')

Powered by Google App Engine
This is Rietveld 408576698