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

Side by Side 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 cros 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « content/browser/tab_contents/tab_contents_unittest.cc ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Property Changes:
Added: svn:eol-style
+ LF
OLDNEW
(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 // Called when the interstitial is proceeded or cancelled. Note that this may
27 // be called by content directly even if the embedder didn't call Proceed or
28 // DontProceed on InterstitialPage, since navigations etc may cancel them.
29 virtual void OnProceed() {}
30 virtual void OnDontProceed() {}
31
32 // Invoked when the page sent a command through DOMAutomation.
33 virtual void CommandReceived(const std::string& command) {}
34
35 // Invoked with the NavigationEntry that is going to be added to the
36 // navigation controller.
37 // Gives an opportunity to delegates to set states on the |entry|.
38 // Note that this is only called if the InterstitialPage was constructed with
39 // |new_navigation| set to true.
40 virtual void OverrideEntry(content::NavigationEntry* entry) {}
41
42 // Allows the delegate to override the renderer preferences structure that's
43 // sent to the new RenderViewHost.
44 virtual void OverrideRendererPrefs(content::RendererPreferences* prefs) {}
45 };
46
47 } // namespace content
48
49 #endif // CONTENT_PUBLIC_BROWSER_INTERSTITIAL_PAGE_DELEGATE_H_
OLDNEW
« 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