blob: 485b3426f11e39f7260f926fc491ce69bdb0ab56 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
|
// Copyright 2014 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#ifndef IOS_WEB_WEB_STATE_WEB_STATE_FACADE_DELEGATE_H_
#define IOS_WEB_WEB_STATE_WEB_STATE_FACADE_DELEGATE_H_
namespace content {
class WebContents;
}
namespace web {
// Interface used by WebStates to drive their WebContents facades. This pushes
// the ownership of the facade out of the web-layer to simplify upstreaming
// efforts. Once upstream features are componentized and use WebState, this
// class will no longer be necessary.
class WebStateFacadeDelegate {
public:
WebStateFacadeDelegate() {}
virtual ~WebStateFacadeDelegate() {}
// Returns the facade object being driven by this delegate.
virtual content::WebContents* GetWebContentsFacade() = 0;
// Called when the web state's |isLoading| property is changed.
virtual void OnLoadingStateChanged() = 0;
// Called when the current page has finished loading.
virtual void OnPageLoaded() = 0;
};
} // namespace web
#endif // IOS_WEB_WEB_STATE_WEB_STATE_FACADE_DELEGATE_H_
|