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

Side by Side 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 unified diff | 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 »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #import "SampleAppDelegate.h" 1 #import "SampleAppDelegate.h"
2
3 #include "SkApplication.h"
4
2 @implementation SampleAppDelegate 5 @implementation SampleAppDelegate
3 @synthesize fWindow, fView, fOptions; 6 @synthesize fWindow, fView, fOptions;
4 7
5 -(void) applicationDidFinishLaunching:(NSNotification *)aNotification { 8 -(void) applicationDidFinishLaunching:(NSNotification *)aNotification {
6 //Load specified skia views after launching 9 //Load specified skia views after launching
7 fView.fOptionsDelegate = fOptions; 10 fView.fOptionsDelegate = fOptions;
8 [fWindow setAcceptsMouseMovedEvents:YES]; 11 [fWindow setAcceptsMouseMovedEvents:YES];
9 [fOptions registerMenus:fView.fWind->getMenus()]; 12 [fOptions registerMenus:fView.fWind->getMenus()];
10 } 13 }
11 14
12 - (IBAction)toiPadSize:(id)sender { 15 - (IBAction)toiPadSize:(id)sender {
13 NSRect frame = NSMakeRect(fWindow.frame.origin.x, fWindow.frame.origin.y, 76 8, 1024); 16 NSRect frame = NSMakeRect(fWindow.frame.origin.x, fWindow.frame.origin.y, 76 8, 1024);
14 [fWindow setFrame:frame display:YES animate:YES]; 17 [fWindow setFrame:frame display:YES animate:YES];
15 } 18 }
19
20 - (NSApplicationTerminateReply)applicationShouldTerminate:(NSApplication *)sende r {
21 application_term();
22 return NSTerminateNow;
23 }
24
16 @end 25 @end
OLDNEW
« 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