continueUserActivity:(NSUserActivity *)userActivity
restorationHandler:(void (^)(NSArray *restorableObjects))restorationHandler {
std::string activity_type(base::SysNSStringToUTF8(userActivity.activityType));
-
+
std::map<std::string, std::string> user_info;
-
+
NSArray* keys = [userActivity.userInfo allKeys];
for (NSString* key in keys)
{
+++ /dev/null
-#import <Cocoa/Cocoa.h>
-
-#include "base/values.h"
-#include "base/strings/sys_string_conversions.h"
-
-@interface MacNativeConverter : NSObject
-
-- (base::ListValue*)arrayToV8:(NSArray*)nsArray;
-- (base::DictionaryValue*)dictionaryToV8:(NSDictionary*)nsDictionary;
-
-@end
+++ /dev/null
-#import "atom/browser/mac/mac_native_converter.h"
-
-@implementation MacNativeConverter
-
-- (base::ListValue*)arrayToV8:(NSArray*)nsArray {
- scoped_ptr<base::ListValue> list(new base::ListValue);
-
- for (id value in nsArray) {
- if ([value isKindOfClass:[NSArray class]]) {
- list->Append([self arrayToV8:value]);
- } else if ([value isKindOfClass:[NSDictionary class]]) {
- list->Append([self dictionaryToV8:value]);
- } else if ([value isKindOfClass:[NSString class]]) {
- list->AppendString(base::SysNSStringToUTF8(value));
- } else if ([value isKindOfClass:[NSNumber class]]) {
- list->AppendInteger(((NSNumber* )value).intValue);
- }
- }
-
- return list.get();
-}
-
-- (base::DictionaryValue*)dictionaryToV8:(NSDictionary*)nsDictionary {
- scoped_ptr<base::DictionaryValue> dict(new base::DictionaryValue);
-
- NSEnumerator *it = [nsDictionary keyEnumerator];
- while (NSString *key = [it nextObject]) {
- id value = [nsDictionary objectForKey:key];
-
- std::string key_str(base::SysNSStringToUTF8(key));
-
- if ([value isKindOfClass:[NSArray class]]) {
- dict->Set(key_str, [self arrayToV8:value]);
- } else if ([value isKindOfClass:[NSDictionary class]]) {
- dict->Set(key_str, [self dictionaryToV8:value]);
- } else if ([value isKindOfClass:[NSString class]]) {
- dict->SetString(key_str, base::SysNSStringToUTF8(value));
- } else if ([value isKindOfClass:[NSNumber class]]) {
- dict->SetInteger(key_str, ((NSNumber* )value).intValue);
- }
- }
-
- return dict.get();
-}
-
-@end
'atom/browser/mac/atom_application.mm',
'atom/browser/mac/atom_application_delegate.h',
'atom/browser/mac/atom_application_delegate.mm',
- 'atom/browser/mac/mac_native_converter.h',
- 'atom/browser/mac/mac_native_converter.mm',
'atom/browser/native_window.cc',
'atom/browser/native_window.h',
'atom/browser/native_window_views_win.cc',