Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(193)

Side by Side Diff: ios/chrome/browser/web/auto_reload_controller.h

Issue 2580333003: Upstream Chrome on iOS source code [10/11]. (Closed)
Patch Set: Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
5 #ifndef IOS_CHROME_BROWSER_WEB_AUTO_RELOAD_CONTROLLER_H_
6 #define IOS_CHROME_BROWSER_WEB_AUTO_RELOAD_CONTROLLER_H_
7
8 #include <Foundation/Foundation.h>
9
10 #include "url/gurl.h"
11
12 // AutoReloadDelegate is the interface by which AutoReloadController affects the
13 // outside world. Tests can use a mock object implementing this protocol;
14 // normally, this is provided by AutoReloadBridge.
15 @protocol AutoReloadDelegate
16
17 // When called, this method should reload the tab being tracked (see the class
18 // comment on AutoReloadController below).
19 - (void)reload;
20
21 @end
22
23 // AutoReloadController implements the auto-reload logic. An
24 // AutoReloadController instance receives state change notifications from an
25 // AutoReloadBridge and calls back to its AutoReloadDelegate (in practice the
26 // same object as the AutoReloadBridge) to issue reload requests. Conceptually,
27 // an AutoReloadController tracks the state of a single tab.
28 @interface AutoReloadController : NSObject
29
30 // Initialize this object with a supplied delegate and initial online status.
31 - (instancetype)initWithDelegate:(id<AutoReloadDelegate>)delegate
32 onlineStatus:(BOOL)onlineStatus;
33
34 // This method notifies this object that a page load started for |url|.
35 - (void)loadStartedForURL:(const GURL&)url;
36
37 // This method notifies this object that a page load finished for |url|.
38 - (void)loadFinishedForURL:(const GURL&)url wasPost:(BOOL)wasPost;
39
40 // This method notifies this object that a page load failed for |url|.
41 - (void)loadFailedForURL:(const GURL&)url wasPost:(BOOL)wasPost;
42
43 // This method notifies this object that the device's network state changed to
44 // |online|.
45 - (void)networkStateChangedToOnline:(BOOL)online;
46
47 @end
48
49 #endif // IOS_CHROME_BROWSER_WEB_AUTO_RELOAD_CONTROLLER_H_
OLDNEW
« no previous file with comments | « ios/chrome/browser/web/auto_reload_bridge.mm ('k') | ios/chrome/browser/web/auto_reload_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698