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

Side by Side Diff: ios/web/public/web_state/web_state_delegate.h

Issue 1851003003: [ios] Added web// public API to let embedder observe loading progress. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Self review Created 4 years, 8 months 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 2016 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_WEB_PUBLIC_WEB_STATE_WEB_STATE_DELEGATE_H_
6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_DELEGATE_H_
7
8 #include <set>
9
10 #include "base/callback.h"
11
12 namespace net {
13 class SSLInfo;
14 }
15
16 namespace web {
17
18 struct SSLStatus;
19 class WebState;
20
21 // Objects implement this interface to get notified about changes in the
22 // WebState and to provide necessary functionality.
23 class WebStateDelegate {
24 public:
25 WebStateDelegate();
26
27 // Notifies the delegate that the page has made some progress loading.
28 // |progress| is a value between 0.0 (nothing loaded) to 1.0 (page fully
29 // loaded).
30 virtual void LoadProgressChanged(WebState* source, double progress);
31
32 protected:
33 virtual ~WebStateDelegate();
34
35 private:
36 friend class WebStateImpl;
37
38 // Called when |this| becomes the WebStateDelegate for |source|.
39 void Attach(WebState* source);
40
41 // Called when |this| is no longer the WebStateDelegate for |source|.
42 void Detach(WebState* source);
43
44 // The WebStates for which |this| is currently a delegate for.
rohitrao (ping after 24h) 2016/04/13 12:01:13 Omit the second "for".
Eugene But (OOO till 7-30) 2016/04/13 15:03:53 Done.
45 std::set<WebState*> attached_states_;
46 };
47
48 } // namespace web
49
50 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_DELEGATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698