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

Unified Diff: experimental/iOSSampleApp/Shared/skia_ios.mm

Issue 389653004: share dm and command flags (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: sync up with latest dm Created 6 years, 5 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 | « experimental/SimpleiOSApp/SimpleApp.mm ('k') | gyp/bench.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: experimental/iOSSampleApp/Shared/skia_ios.mm
diff --git a/experimental/iOSSampleApp/Shared/skia_ios.mm b/experimental/iOSSampleApp/Shared/skia_ios.mm
index 4fce1392d81fc692044b9dfadb4cb61ad6de83dd..45675fa61a0b4ef817997c899b682c32f2443784 100644
--- a/experimental/iOSSampleApp/Shared/skia_ios.mm
+++ b/experimental/iOSSampleApp/Shared/skia_ios.mm
@@ -1,8 +1,6 @@
#import <UIKit/UIKit.h>
#include "SkApplication.h"
-extern bool set_cmd_line_args(int argc, char *argv[], const char* dir);
-
int main(int argc, char *argv[]) {
signal(SIGPIPE, SIG_IGN);
NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
@@ -11,9 +9,9 @@ int main(int argc, char *argv[]) {
NSArray *dirPaths = NSSearchPathForDirectoriesInDomains(NSDocumentDirectory, NSUserDomainMask, YES);
NSString *docsDir = [dirPaths objectAtIndex:0];
const char *d = [docsDir UTF8String];
-
- bool ranCommand = set_cmd_line_args(argc, argv, d);
- int retVal = ranCommand ? 0 : UIApplicationMain(argc, argv, nil, nil);
+ IOS_launch_type launchType = set_cmd_line_args(argc, argv, d);
+ int retVal = launchType == kApplication__iOSLaunchType
+ ? UIApplicationMain(argc, argv, nil, nil) : (int) launchType;
application_term();
[pool release];
return retVal;
« no previous file with comments | « experimental/SimpleiOSApp/SimpleApp.mm ('k') | gyp/bench.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698