OLD | NEW |
(Empty) | |
| 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. |
| 4 |
| 5 #ifndef CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_DELEGATE_H_ |
| 6 #define CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_DELEGATE_H_ |
| 7 |
| 8 #include <string> |
| 9 |
| 10 #include "content/common/content_export.h" |
| 11 |
| 12 namespace content { |
| 13 |
| 14 class NavigationEntry; |
| 15 struct RendererPreferences; |
| 16 |
| 17 // Controls and provides the html for an interstitial page. The delegate is |
| 18 // owned by the InterstitialPage. |
| 19 class InterstitialPageDelegate { |
| 20 public: |
| 21 virtual ~InterstitialPageDelegate() {} |
| 22 |
| 23 // Return the HTML that should be displayed in the page. |
| 24 virtual std::string GetHTMLContents() = 0; |
| 25 |
| 26 // Invoked when the page sent a command through DOMAutomation. |
| 27 virtual void CommandReceived(const std::string& command) {} |
| 28 |
| 29 // Invoked with the NavigationEntry that is going to be added to the |
| 30 // navigation controller. |
| 31 // Gives an opportunity to delegates to set states on the |entry|. |
| 32 // Note that this is only called if the InterstitialPage was constructed with |
| 33 // |new_navigation| set to true. |
| 34 virtual void OverrideEntry(content::NavigationEntry* entry) {} |
| 35 |
| 36 // Allows the delegate to override the renderer preferences structure that's |
| 37 // sent to the new RenderViewHost. |
| 38 virtual void OverrideRendererPrefs(content::RendererPreferences* prefs) {} |
| 39 }; |
| 40 |
| 41 } // namespace content |
| 42 |
| 43 #endif // CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_DELEGATE_H_ |
OLD | NEW |