| 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_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_BRIDGE_H_ | 5 #ifndef IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_BRIDGE_H_ |
| 6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_BRIDGE_H_ | 6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_BRIDGE_H_ |
| 7 | 7 |
| 8 #import <Foundation/Foundation.h> | 8 #import <Foundation/Foundation.h> |
| 9 | 9 |
| 10 #include <string> | 10 #include <string> |
| 11 | 11 |
| 12 #import "base/ios/weak_nsobject.h" | 12 #import "base/ios/weak_nsobject.h" |
| 13 #include "base/macros.h" |
| 13 #import "ios/web/public/web_state/web_state_observer.h" | 14 #import "ios/web/public/web_state/web_state_observer.h" |
| 14 | 15 |
| 15 class GURL; | 16 class GURL; |
| 16 | 17 |
| 17 // Observes page lifecyle events from Objective-C. To use as a | 18 // Observes page lifecyle events from Objective-C. To use as a |
| 18 // web::WebStateObserver, wrap in a web::WebStateObserverBridge. | 19 // web::WebStateObserver, wrap in a web::WebStateObserverBridge. |
| 19 @protocol CRWWebStateObserver<NSObject> | 20 @protocol CRWWebStateObserver<NSObject> |
| 20 @optional | 21 @optional |
| 21 | 22 |
| 22 // Invoked by WebStateObserverBridge::ProvisionalNavigationStarted. | 23 // Invoked by WebStateObserverBridge::ProvisionalNavigationStarted. |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 109 void DidStopLoading() override; | 110 void DidStopLoading() override; |
| 110 | 111 |
| 111 private: | 112 private: |
| 112 base::WeakNSProtocol<id<CRWWebStateObserver>> observer_; | 113 base::WeakNSProtocol<id<CRWWebStateObserver>> observer_; |
| 113 DISALLOW_COPY_AND_ASSIGN(WebStateObserverBridge); | 114 DISALLOW_COPY_AND_ASSIGN(WebStateObserverBridge); |
| 114 }; | 115 }; |
| 115 | 116 |
| 116 } // namespace web | 117 } // namespace web |
| 117 | 118 |
| 118 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_BRIDGE_H_ | 119 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_OBSERVER_BRIDGE_H_ |
| OLD | NEW |