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

Unified Diff: content/public/browser/interstitial_page_delegate.h

Issue 9323071: Use InterstitialPage through a delegate interface instead of deriving from it. (Closed) Base URL: svn://chrome-svn/chrome/trunk/src/
Patch Set: fix tests Created 8 years, 10 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 | « content/browser/tab_contents/tab_contents_unittest.cc ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/public/browser/interstitial_page_delegate.h
===================================================================
--- content/public/browser/interstitial_page_delegate.h (revision 0)
+++ content/public/browser/interstitial_page_delegate.h (revision 0)
@@ -0,0 +1,49 @@
+// Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_DELEGATE_H_
+#define CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_DELEGATE_H_
+
+#include <string>
+
+#include "content/common/content_export.h"
+
+namespace content {
+
+class NavigationEntry;
+struct RendererPreferences;
+
+// Controls and provides the html for an interstitial page. The delegate is
+// owned by the InterstitialPage.
+class InterstitialPageDelegate {
+ public:
+ virtual ~InterstitialPageDelegate() {}
+
+ // Return the HTML that should be displayed in the page.
+ virtual std::string GetHTMLContents() = 0;
+
+ // Called when the interstitial is proceeded or cancelled. Note that this may
+ // be called by content directly even if the embedder didn't call Proceed or
+ // DontProceed on InterstitialPage, since navigations etc may cancel them.
+ virtual void OnProceed() {}
+ virtual void OnDontProceed() {}
+
+ // Invoked when the page sent a command through DOMAutomation.
Avi (use Gerrit) 2012/02/07 00:33:50 I thought DOMAutomation was a chrome concept :)
jam 2012/02/07 01:10:05 the larger automation code is. But this unfortunat
+ virtual void CommandReceived(const std::string& command) {}
+
+ // Invoked with the NavigationEntry that is going to be added to the
+ // navigation controller.
+ // Gives an opportunity to delegates to set states on the |entry|.
+ // Note that this is only called if the InterstitialPage was constructed with
+ // |new_navigation| set to true.
+ virtual void OverrideEntry(content::NavigationEntry* entry) {}
+
+ // Allows the delegate to override the renderer preferences structure that's
+ // sent to the new RenderViewHost.
+ virtual void OverrideRendererPrefs(content::RendererPreferences* prefs) {}
+};
+
+} // namespace content
+
+#endif // CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_DELEGATE_H_
Property changes on: content\public\browser\interstitial_page_delegate.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « content/browser/tab_contents/tab_contents_unittest.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698