Supervised user import: Listen for profile creation/deletion
[chromium-blink-merge.git] / ios / web / public / interstitials / web_interstitial_delegate.h
blobfefad16916c36a53d7cdf6ad6d7a94965cf4d29e
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_
8 #include <string>
10 namespace web {
12 // Controls and provides the html for an interstitial page. The delegate is
13 // owned by the WebInterstitial.
14 class WebInterstitialDelegate {
15 public:
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) {}
31 } // namespace web
33 #endif // IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_DELEGATE_H_