1 // Copyright 2015 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.
5 #ifndef IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_DELEGATE_H_
6 #define IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_DELEGATE_H_
12 // Controls and provides the html for an interstitial page. The delegate is
13 // owned by the WebInterstitial.
14 class WebInterstitialDelegate
{
16 virtual ~WebInterstitialDelegate() {}
18 // Returns the HTML that should be displayed in the page.
19 virtual std::string
GetHtmlContents() const = 0;
21 // Called when the interstitial is proceeded or cancelled. Note that this may
22 // be called directly even if the embedder didn't call Proceed or DontProceed
23 // on WebInterstitial, since navigations etc may cancel them.
24 virtual void OnProceed() {}
25 virtual void OnDontProceed() {}
27 // Invoked when a WebInterstitial receives a command via JavaScript.
28 virtual void CommandReceived(const std::string
& command
) {}
33 #endif // IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_DELEGATE_H_