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

Unified Diff: content/browser/ppapi_plugin_process_host.cc

Issue 7491024: Wire up the IP address change notification to the PPAPI network state (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Created 9 years, 5 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/ppapi_plugin_process_host.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/browser/ppapi_plugin_process_host.cc
===================================================================
--- content/browser/ppapi_plugin_process_host.cc (revision 93640)
+++ content/browser/ppapi_plugin_process_host.cc (working copy)
@@ -19,11 +19,13 @@
: BrowserChildProcessHost(ChildProcessInfo::PPAPI_PLUGIN_PROCESS),
filter_(new PepperMessageFilter(host_resolver)) {
AddFilter(filter_.get());
+ net::NetworkChangeNotifier::AddIPAddressObserver(this);
net::NetworkChangeNotifier::AddOnlineStateObserver(this);
}
PpapiPluginProcessHost::~PpapiPluginProcessHost() {
net::NetworkChangeNotifier::RemoveOnlineStateObserver(this);
+ net::NetworkChangeNotifier::RemoveIPAddressObserver(this);
CancelRequests();
}
@@ -158,6 +160,16 @@
}
}
+void PpapiPluginProcessHost::OnIPAddressChanged() {
+ // TODO(brettw) bug 90246: This doesn't seem correct. The online/offline
+ // notification seems like it should be sufficient, but I don't see that when
+ // I unplug and replug my network cable. Sending this notification when
+ // "something" changes seems to make Flash reasonably happy, but seems wrong.
+ // We should really be able to provide the real online state in
+ // OnOnlineStateChanged().
+ Send(new PpapiMsg_SetNetworkState(true));
+}
+
void PpapiPluginProcessHost::OnOnlineStateChanged(bool online) {
Send(new PpapiMsg_SetNetworkState(online));
}
« no previous file with comments | « content/browser/ppapi_plugin_process_host.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698