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