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

Unified Diff: ios/web/public/interstitials/web_interstitial_delegate.h

Issue 986743003: Upstream (most of) ios/web/public (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix namespace comment Created 5 years, 9 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « ios/web/public/interstitials/web_interstitial.h ('k') | ios/web/public/referrer_util.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ios/web/public/interstitials/web_interstitial_delegate.h
diff --git a/ios/web/public/interstitials/web_interstitial_delegate.h b/ios/web/public/interstitials/web_interstitial_delegate.h
new file mode 100644
index 0000000000000000000000000000000000000000..fefad16916c36a53d7cdf6ad6d7a94965cf4d29e
--- /dev/null
+++ b/ios/web/public/interstitials/web_interstitial_delegate.h
@@ -0,0 +1,33 @@
+// Copyright 2015 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_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_DELEGATE_H_
+#define IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_DELEGATE_H_
+
+#include <string>
+
+namespace web {
+
+// Controls and provides the html for an interstitial page. The delegate is
+// owned by the WebInterstitial.
+class WebInterstitialDelegate {
+ public:
+ virtual ~WebInterstitialDelegate() {}
+
+ // Returns the HTML that should be displayed in the page.
+ virtual std::string GetHtmlContents() const = 0;
+
+ // Called when the interstitial is proceeded or cancelled. Note that this may
+ // be called directly even if the embedder didn't call Proceed or DontProceed
+ // on WebInterstitial, since navigations etc may cancel them.
+ virtual void OnProceed() {}
+ virtual void OnDontProceed() {}
+
+ // Invoked when a WebInterstitial receives a command via JavaScript.
+ virtual void CommandReceived(const std::string& command) {}
+};
+
+} // namespace web
+
+#endif // IOS_WEB_PUBLIC_INTERSTITIALS_WEB_INTERSTITIAL_DELEGATE_H_
« no previous file with comments | « ios/web/public/interstitials/web_interstitial.h ('k') | ios/web/public/referrer_util.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698