| OLD | NEW |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | 1 // Copyright 2015 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 #ifndef IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_VIEW_H_ | 5 #ifndef IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_VIEW_H_ |
| 6 #define IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_VIEW_H_ | 6 #define IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_VIEW_H_ |
| 7 | 7 |
| 8 #import <UIKit/UIKit.h> | 8 #import <UIKit/UIKit.h> |
| 9 | 9 |
| 10 #include <memory> | 10 #include <memory> |
| (...skipping 17 matching lines...) Expand all Loading... |
| 28 @interface ReaderModeView : UIView | 28 @interface ReaderModeView : UIView |
| 29 | 29 |
| 30 - (instancetype)initWithFrame:(CGRect)frame | 30 - (instancetype)initWithFrame:(CGRect)frame |
| 31 delegate:(id<ReaderModeViewDelegate>)delegate | 31 delegate:(id<ReaderModeViewDelegate>)delegate |
| 32 NS_DESIGNATED_INITIALIZER; | 32 NS_DESIGNATED_INITIALIZER; |
| 33 | 33 |
| 34 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; | 34 - (instancetype)initWithFrame:(CGRect)frame NS_UNAVAILABLE; |
| 35 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; | 35 - (instancetype)initWithCoder:(NSCoder*)aDecoder NS_UNAVAILABLE; |
| 36 | 36 |
| 37 // The view's delegate. | 37 // The view's delegate. |
| 38 @property(nonatomic, readonly) id<ReaderModeViewDelegate> delegate; | 38 @property(weak, nonatomic, readonly) id<ReaderModeViewDelegate> delegate; |
| 39 | 39 |
| 40 // Takes ownership of the viewer as it is the only handle to the distillation: | 40 // Takes ownership of the viewer as it is the only handle to the distillation: |
| 41 // When freed it cancels the distillation, if it is not finished yet. The | 41 // When freed it cancels the distillation, if it is not finished yet. The |
| 42 // ReaderModeView instance owns this object so that the distillation is | 42 // ReaderModeView instance owns this object so that the distillation is |
| 43 // cancelled if the view is deallocated. | 43 // cancelled if the view is deallocated. |
| 44 - (void)assignDistillerViewer: | 44 - (void)assignDistillerViewer: |
| 45 (std::unique_ptr<dom_distiller::DistillerViewer>)viewer; | 45 (std::unique_ptr<dom_distiller::DistillerViewer>)viewer; |
| 46 | 46 |
| 47 // Starts the waiting animation. | 47 // Starts the waiting animation. |
| 48 - (void)start; | 48 - (void)start; |
| 49 | 49 |
| 50 // Call this method when this view is removed from the visible view hierarchy. | 50 // Call this method when this view is removed from the visible view hierarchy. |
| 51 // |completion| will be called when this view is done animating out. | 51 // |completion| will be called when this view is done animating out. |
| 52 - (void)stopWaitingWithCompletion:(ProceduralBlock)completion; | 52 - (void)stopWaitingWithCompletion:(ProceduralBlock)completion; |
| 53 | 53 |
| 54 @end | 54 @end |
| 55 | 55 |
| 56 #endif // IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_VIEW_H_ | 56 #endif // IOS_CHROME_BROWSER_UI_READER_MODE_READER_MODE_VIEW_H_ |
| OLD | NEW |