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

Unified Diff: chrome/browser/chromeos/offline/offline_load_page.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: sync 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
Index: chrome/browser/chromeos/offline/offline_load_page.h
===================================================================
--- chrome/browser/chromeos/offline/offline_load_page.h (revision 120576)
+++ chrome/browser/chromeos/offline/offline_load_page.h (working copy)
@@ -10,22 +10,28 @@
#include "base/callback.h"
#include "base/compiler_specific.h"
-#include "chrome/browser/tab_contents/chrome_interstitial_page.h"
+#include "content/public/browser/interstitial_page_delegate.h"
+#include "googleurl/src/gurl.h"
#include "net/base/network_change_notifier.h"
class Extension;
+class InterstitialPage;
namespace base {
class DictionaryValue;
}
+namespace content {
+class WebContents;
+}
+
namespace chromeos {
// OfflineLoadPage class shows the interstitial page that is shown
// when no network is available and hides when some network (either
// one of wifi, 3g or ethernet) becomes available.
// It deletes itself when the interstitial page is closed.
-class OfflineLoadPage : public ChromeInterstitialPage,
+class OfflineLoadPage : public content::InterstitialPageDelegate,
public net::NetworkChangeNotifier::OnlineStateObserver {
public:
// Passed a boolean indicating whether or not it is OK to proceed with the
@@ -44,12 +50,15 @@
virtual void NotifyBlockingPageComplete(bool proceed);
private:
- // ChromeInterstitialPage implementation.
+ // InterstitialPageDelegate implementation.
virtual std::string GetHTMLContents() OVERRIDE;
virtual void CommandReceived(const std::string& command) OVERRIDE;
- virtual void Proceed() OVERRIDE;
- virtual void DontProceed() OVERRIDE;
+ virtual void OverrideRendererPrefs(
+ content::RendererPreferences* prefs) OVERRIDE;
+ void Proceed();
+ void DontProceed();
+
// net::NetworkChangeNotifier::OnlineStateObserver overrides.
virtual void OnOnlineStateChanged(bool online) OVERRIDE;
@@ -70,7 +79,9 @@
// True if the proceed is chosen.
bool proceeded_;
- bool in_test_;
+ content::WebContents* web_contents_;
+ GURL url_;
+ InterstitialPage* interstitial_page_; // Owns us.
DISALLOW_COPY_AND_ASSIGN(OfflineLoadPage);
};

Powered by Google App Engine
This is Rietveld 408576698