Chromium Code Reviews| Index: content/renderer/render_thread.cc |
| diff --git a/content/renderer/render_thread.cc b/content/renderer/render_thread.cc |
| index 6022610e1cf9687030979fd7e2aeec66f0b11746..e6fcd2efc2fc719a9b847419add73705fc660440 100644 |
| --- a/content/renderer/render_thread.cc |
| +++ b/content/renderer/render_thread.cc |
| @@ -56,6 +56,7 @@ |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebDocument.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebFrame.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebKit.h" |
| +#include "third_party/WebKit/Source/WebKit/chromium/public/WebNetworkStateNotifier.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebRuntimeFeatures.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebScriptController.h" |
| #include "third_party/WebKit/Source/WebKit/chromium/public/WebStorageEventDispatcher.h" |
| @@ -398,6 +399,7 @@ bool RenderThread::OnControlMessageReceived(const IPC::Message& msg) { |
| // is there a new non-windows message I should add here? |
| IPC_MESSAGE_HANDLER(ViewMsg_New, OnCreateNewView) |
| IPC_MESSAGE_HANDLER(ViewMsg_PurgePluginListCache, OnPurgePluginListCache) |
| + IPC_MESSAGE_HANDLER(ViewMsg_NetworkStateChanged, OnNetworkStateChanged) |
| IPC_MESSAGE_HANDLER(DOMStorageMsg_Event, OnDOMStorageEvent) |
| IPC_MESSAGE_UNHANDLED(handled = false) |
| IPC_END_MESSAGE_MAP() |
| @@ -669,6 +671,11 @@ void RenderThread::OnPurgePluginListCache(bool reload_pages) { |
| plugin_refresh_allowed_ = true; |
| } |
| +void RenderThread::OnNetworkStateChanged(bool online) { |
| + EnsureWebKitInitialized(); |
| + WebKit::WebNetworkStateNotifier::setOnLine(online); |
|
darin (slow to review)
2011/07/01 18:19:15
nit: convention is to add a using directive at the
adamk
2011/07/01 18:48:06
Done.
|
| +} |
| + |
| scoped_refptr<base::MessageLoopProxy> |
| RenderThread::GetFileThreadMessageLoopProxy() { |
| DCHECK(message_loop() == MessageLoop::current()); |