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

Side by Side Diff: ios/web/public/web_state/web_state_delegate_bridge.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: Fixed compilation 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
« no previous file with comments | « ios/web/public/web_state/web_state_delegate.h ('k') | ios/web/shell/view_controller.mm » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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_BRIDGE_H_
6 #define IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_DELEGATE_BRIDGE_H_
7
8 #import <Foundation/Foundation.h>
9
10 #import "base/ios/weak_nsobject.h"
11 #include "ios/web/public/web_state/web_state_delegate.h"
12
13 // Objective-C interface for web::WebStateDelegate.
14 @protocol CRWWebStateDelegate<NSObject>
15 @optional
16
17 // Called when the page has made some progress loading. |progress| is a value
18 // between 0.0 (nothing loaded) to 1.0 (page fully loaded).
19 - (void)webState:(web::WebState*)webState didChangeProgress:(double)progress;
20
21 @end
22
23 namespace web {
24
25 // Adapter to use an id<CRWWebStateDelegate> as a web::WebStateDelegate.
26 class WebStateDelegateBridge : public web::WebStateDelegate {
27 public:
28 explicit WebStateDelegateBridge(id<CRWWebStateDelegate> delegate);
29 ~WebStateDelegateBridge() override;
30
31 // web::WebStateDelegate methods.
32 void LoadProgressChanged(WebState* source, double progress) override;
33
34 private:
35 // CRWWebStateDelegate which receives forwarded calls.
36 base::WeakNSProtocol<id<CRWWebStateDelegate>> delegate_;
37 DISALLOW_COPY_AND_ASSIGN(WebStateDelegateBridge);
38 };
39
40 } // web
41
42 #endif // IOS_WEB_PUBLIC_WEB_STATE_WEB_STATE_DELEGATE_BRIDGE_H_
OLDNEW
« no previous file with comments | « ios/web/public/web_state/web_state_delegate.h ('k') | ios/web/shell/view_controller.mm » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698