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