Update broken references to image assets
[chromium-blink-merge.git] / content / public / browser / interstitial_page_delegate.h
blobd64879c25490ee51a769393d1959459554b303a4
1 // Copyright (c) 2012 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 CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_DELEGATE_H_
6 #define CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_DELEGATE_H_
8 #include <string>
10 #include "content/common/content_export.h"
12 namespace content {
14 class NavigationEntry;
15 struct RendererPreferences;
17 // Controls and provides the html for an interstitial page. The delegate is
18 // owned by the InterstitialPage.
19 class CONTENT_EXPORT InterstitialPageDelegate {
20 public:
21 // An identifier used to identify an InterstitialPage.
22 typedef const void* TypeID;
24 virtual ~InterstitialPageDelegate() {}
26 // Return the HTML that should be displayed in the page.
27 virtual std::string GetHTMLContents() = 0;
29 // Called when the interstitial is proceeded or cancelled. Note that this may
30 // be called by content directly even if the embedder didn't call Proceed or
31 // DontProceed on InterstitialPage, since navigations etc may cancel them.
32 virtual void OnProceed() {}
33 virtual void OnDontProceed() {}
35 // Invoked when the page sent a command through DOMAutomation.
36 virtual void CommandReceived(const std::string& command) {}
38 // Invoked with the NavigationEntry that is going to be added to the
39 // navigation controller.
40 // Gives an opportunity to delegates to set states on the |entry|.
41 // Note that this is only called if the InterstitialPage was constructed with
42 // |new_navigation| set to true.
43 virtual void OverrideEntry(content::NavigationEntry* entry) {}
45 // Allows the delegate to override the renderer preferences structure that's
46 // sent to the new RenderViewHost.
47 virtual void OverrideRendererPrefs(content::RendererPreferences* prefs) {}
49 // Return the interstitial type for testing.
50 virtual TypeID GetTypeForTesting() const;
53 } // namespace content
55 #endif // CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_DELEGATE_H_