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

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: 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 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 120733)
+++ 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,11 +50,13 @@
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;
+ virtual void OnProceed() OVERRIDE;
+ virtual void OnDontProceed() OVERRIDE;
// net::NetworkChangeNotifier::OnlineStateObserver overrides.
virtual void OnOnlineStateChanged(bool online) OVERRIDE;
@@ -70,7 +78,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);
};
« no previous file with comments | « chrome/browser/chrome_content_browser_client.cc ('k') | chrome/browser/chromeos/offline/offline_load_page.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698