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

Unified Diff: content/browser/tab_contents/tab_contents.cc

Issue 6526059: Plumb through NetworkChangeNotifier::IsOffline() to WebKit, enabling (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Appease the C++ type system Created 9 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
« no previous file with comments | « content/browser/tab_contents/tab_contents.h ('k') | jingle/notifier/communicator/login.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/tab_contents/tab_contents.cc
diff --git a/content/browser/tab_contents/tab_contents.cc b/content/browser/tab_contents/tab_contents.cc
index 6f93e148d676bf1185b2b7155fcadb571f9fb179..40ed3a4999b34edefe1c7e85933aca74c67a43d3 100644
--- a/content/browser/tab_contents/tab_contents.cc
+++ b/content/browser/tab_contents/tab_contents.cc
@@ -395,6 +395,8 @@ TabContents::~TabContents() {
}
FOR_EACH_OBSERVER(TabContentsObserver, observers_, set_tab_contents(NULL));
+
+ net::NetworkChangeNotifier::RemoveOnlineStateObserver(this);
}
void TabContents::AddObservers() {
@@ -409,6 +411,7 @@ void TabContents::AddObservers() {
plugin_observer_.reset(new PluginObserver(this));
safebrowsing_detection_host_.reset(new safe_browsing::ClientSideDetectionHost(
this));
+ net::NetworkChangeNotifier::AddOnlineStateObserver(this);
}
bool TabContents::OnMessageReceived(const IPC::Message& message) {
@@ -2852,6 +2855,11 @@ void TabContents::CreateViewAndSetSizeForRVH(RenderViewHost* rvh) {
rwh_view->SetSize(view()->GetContainerSize());
}
+void TabContents::OnOnlineStateChanged(bool online) {
+ render_view_host()->Send(new ViewMsg_NetworkStateChanged(
+ render_view_host()->routing_id(), online));
+}
+
bool TabContents::MaybeUsePreloadedPage(const GURL& url) {
prerender::PrerenderManager* pm = profile()->GetPrerenderManager();
if (pm != NULL) {
« no previous file with comments | « content/browser/tab_contents/tab_contents.h ('k') | jingle/notifier/communicator/login.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698