| 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 #include "base/mac/scoped_nsobject.h" | 5 #include "base/mac/scoped_nsobject.h" |
| 6 #include "components/bookmarks/browser/bookmark_model.h" | 6 #include "components/bookmarks/browser/bookmark_model.h" |
| 7 #include "components/reading_list/reading_list_model.h" | 7 #include "components/reading_list/ios/reading_list_model.h" |
| 8 #include "ios/chrome/browser/share_extension/share_extension_item_receiver.h" | 8 #include "ios/chrome/browser/share_extension/share_extension_item_receiver.h" |
| 9 #include "ios/chrome/browser/share_extension/share_extension_service.h" | 9 #include "ios/chrome/browser/share_extension/share_extension_service.h" |
| 10 | 10 |
| 11 #if !defined(__has_feature) || !__has_feature(objc_arc) | 11 #if !defined(__has_feature) || !__has_feature(objc_arc) |
| 12 #error "This file requires ARC support." | 12 #error "This file requires ARC support." |
| 13 #endif | 13 #endif |
| 14 | 14 |
| 15 ShareExtensionService::ShareExtensionService( | 15 ShareExtensionService::ShareExtensionService( |
| 16 bookmarks::BookmarkModel* bookmark_model, | 16 bookmarks::BookmarkModel* bookmark_model, |
| 17 ReadingListModel* reading_list_model) | 17 ReadingListModel* reading_list_model) |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 this->AnyModelLoaded(); | 54 this->AnyModelLoaded(); |
| 55 } | 55 } |
| 56 | 56 |
| 57 void ShareExtensionService::AnyModelLoaded() { | 57 void ShareExtensionService::AnyModelLoaded() { |
| 58 if (reading_list_model_loaded_ && bookmark_model_loaded_) { | 58 if (reading_list_model_loaded_ && bookmark_model_loaded_) { |
| 59 [[ShareExtensionItemReceiver sharedInstance] | 59 [[ShareExtensionItemReceiver sharedInstance] |
| 60 setBookmarkModel:bookmark_model_ | 60 setBookmarkModel:bookmark_model_ |
| 61 readingListModel:reading_list_model_]; | 61 readingListModel:reading_list_model_]; |
| 62 } | 62 } |
| 63 } | 63 } |
| OLD | NEW |