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 "components/reading_list/ios/reading_list_model_bridge_observer.h" | 5 #import "components/reading_list/ios/reading_list_model_bridge_observer.h" |
6 | 6 |
7 #include "components/reading_list/ios/reading_list_entry.h" | 7 #include "components/reading_list/core/reading_list_entry.h" |
8 #include "components/reading_list/ios/reading_list_model.h" | 8 #include "components/reading_list/core/reading_list_model.h" |
9 | 9 |
10 ReadingListModelBridge::ReadingListModelBridge( | 10 ReadingListModelBridge::ReadingListModelBridge( |
11 id<ReadingListModelBridgeObserver> observer, | 11 id<ReadingListModelBridgeObserver> observer, |
12 ReadingListModel* model) | 12 ReadingListModel* model) |
13 : observer_(observer), model_(model) { | 13 : observer_(observer), model_(model) { |
14 DCHECK(model); | 14 DCHECK(model); |
15 model_->AddObserver(this); | 15 model_->AddObserver(this); |
16 } | 16 } |
17 | 17 |
18 ReadingListModelBridge::~ReadingListModelBridge() { | 18 ReadingListModelBridge::~ReadingListModelBridge() { |
(...skipping 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 } | 95 } |
96 | 96 |
97 void ReadingListModelBridge::ReadingListWillUpdateEntry( | 97 void ReadingListModelBridge::ReadingListWillUpdateEntry( |
98 const ReadingListModel* model, | 98 const ReadingListModel* model, |
99 const GURL& url) { | 99 const GURL& url) { |
100 if ([observer_ | 100 if ([observer_ |
101 respondsToSelector:@selector(readingListModel:willUpdateEntry:)]) { | 101 respondsToSelector:@selector(readingListModel:willUpdateEntry:)]) { |
102 [observer_ readingListModel:model willUpdateEntry:url]; | 102 [observer_ readingListModel:model willUpdateEntry:url]; |
103 } | 103 } |
104 } | 104 } |
OLD | NEW |