Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #import "ios/chrome/browser/share_extension/share_extension_item_receiver.h" | 5 #import "ios/chrome/browser/share_extension/share_extension_item_receiver.h" |
| 6 | 6 |
| 7 #import <UIKit/UIKit.h> | 7 #import <UIKit/UIKit.h> |
| 8 | 8 |
| 9 #include "base/ios/block_types.h" | 9 #include "base/ios/block_types.h" |
| 10 #include "base/mac/bind_objc_block.h" | 10 #include "base/mac/bind_objc_block.h" |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 91 [[ShareExtensionItemReceiver alloc] init]; | 91 [[ShareExtensionItemReceiver alloc] init]; |
| 92 return instance; | 92 return instance; |
| 93 } | 93 } |
| 94 | 94 |
| 95 - (void)setBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel | 95 - (void)setBookmarkModel:(bookmarks::BookmarkModel*)bookmarkModel |
| 96 readingListModel:(ReadingListModel*)readingListModel { | 96 readingListModel:(ReadingListModel*)readingListModel { |
| 97 DCHECK_CURRENTLY_ON(web::WebThread::UI); | 97 DCHECK_CURRENTLY_ON(web::WebThread::UI); |
| 98 DCHECK(!_readingListModel); | 98 DCHECK(!_readingListModel); |
| 99 DCHECK(!_bookmarkModel); | 99 DCHECK(!_bookmarkModel); |
| 100 | 100 |
| 101 #if TARGET_IPHONE_SIMULATOR | |
|
rohitrao (ping after 24h)
2016/12/19 09:40:33
We're running egtests on devices as well, that's w
sdefresne
2016/12/20 01:03:38
I think we should try to get the entitlements for
| |
| 102 if (![self presentedItemURL]) { | 101 if (![self presentedItemURL]) { |
| 103 return; | 102 return; |
| 104 } | 103 } |
| 105 #else | |
| 106 DCHECK([self presentedItemURL]); | |
| 107 #endif | |
| 108 | 104 |
| 109 _readingListModel = readingListModel; | 105 _readingListModel = readingListModel; |
| 110 _bookmarkModel = bookmarkModel; | 106 _bookmarkModel = bookmarkModel; |
| 111 | 107 |
| 112 web::WebThread::PostTask(web::WebThread::FILE, FROM_HERE, | 108 web::WebThread::PostTask(web::WebThread::FILE, FROM_HERE, |
| 113 base::BindBlockArc(^() { | 109 base::BindBlockArc(^() { |
| 114 [self createReadingListFolder]; | 110 [self createReadingListFolder]; |
| 115 })); | 111 })); |
| 116 [[NSNotificationCenter defaultCenter] | 112 [[NSNotificationCenter defaultCenter] |
| 117 addObserver:self | 113 addObserver:self |
| (...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 346 | 342 |
| 347 - (NSOperationQueue*)presentedItemOperationQueue { | 343 - (NSOperationQueue*)presentedItemOperationQueue { |
| 348 return [NSOperationQueue mainQueue]; | 344 return [NSOperationQueue mainQueue]; |
| 349 } | 345 } |
| 350 | 346 |
| 351 - (NSURL*)presentedItemURL { | 347 - (NSURL*)presentedItemURL { |
| 352 return app_group::ShareExtensionItemsFolder(); | 348 return app_group::ShareExtensionItemsFolder(); |
| 353 } | 349 } |
| 354 | 350 |
| 355 @end | 351 @end |
| OLD | NEW |