OLD | NEW |
(Empty) | |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 #ifndef IOS_CHROME_BROWSER_WEB_AUTO_RELOAD_BRIDGE_H_ |
| 5 #define IOS_CHROME_BROWSER_WEB_AUTO_RELOAD_BRIDGE_H_ |
| 6 |
| 7 #include <Foundation/Foundation.h> |
| 8 |
| 9 #include "ios/chrome/browser/web/auto_reload_controller.h" |
| 10 #include "url/gurl.h" |
| 11 |
| 12 @class Tab; |
| 13 |
| 14 // AutoReloadBridge is the interface between AutoReloadController and the |
| 15 // outside world and isolates AutoReloadController from its dependencies. |
| 16 // An AutoReloadBridge is responsible for network state tracking, for receiving |
| 17 // and passing on events from its owning Tab, and for passing reload requests |
| 18 // back to its owning Tab. |
| 19 @interface AutoReloadBridge : NSObject<AutoReloadDelegate> |
| 20 |
| 21 // Initialize an instance of this class owned by the supplied Tab, which must |
| 22 // not be nil. |
| 23 - (instancetype)initWithTab:(Tab*)tab; |
| 24 |
| 25 // Called by the owning Tab whenever a load starts. |
| 26 - (void)loadStartedForURL:(const GURL&)url; |
| 27 |
| 28 // Called by the owning Tab whenever a load finishes. |
| 29 - (void)loadFinishedForURL:(const GURL&)url wasPost:(BOOL)wasPost; |
| 30 |
| 31 // Called by the owning Tab whenever a load fails. |
| 32 - (void)loadFailedForURL:(const GURL&)url wasPost:(BOOL)wasPost; |
| 33 |
| 34 @end |
| 35 |
| 36 #endif // IOS_CHROME_BROWSER_WEB_AUTO_RELOAD_BRIDGE_H_ |
OLD | NEW |