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

Unified Diff: src/views/mac/SampleAppDelegate.mm

Issue 636723002: override applicationShouldTerminate so we can cleanup when we quit (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 2 months 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
« no previous file with comments | « src/views/mac/SampleAppDelegate.h ('k') | src/views/mac/skia_mac.mm » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/views/mac/SampleAppDelegate.mm
diff --git a/src/views/mac/SampleAppDelegate.mm b/src/views/mac/SampleAppDelegate.mm
index 91dcada8880d44846e3bb88004fbe0f1d0d90371..8211ad9c48c38cbdc8979f7a5e0b1bdb80d0a93e 100644
--- a/src/views/mac/SampleAppDelegate.mm
+++ b/src/views/mac/SampleAppDelegate.mm
@@ -1,4 +1,7 @@
#import "SampleAppDelegate.h"
+
+#include "SkApplication.h"
+
@implementation SampleAppDelegate
@synthesize fWindow, fView, fOptions;
@@ -13,4 +16,10 @@
NSRect frame = NSMakeRect(fWindow.frame.origin.x, fWindow.frame.origin.y, 768, 1024);
[fWindow setFrame:frame display:YES animate:YES];
}
+
+- (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sender {
+ application_term();
+ return NSTerminateNow;
+}
+
@end
« no previous file with comments | « src/views/mac/SampleAppDelegate.h ('k') | src/views/mac/skia_mac.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698