Convert ViewMsg_NetworkStateChanged from routed -> control,
minimizing the number of required IPCs (since the online state
is a per-WebKit singleton).

In doing so, I've disentangled online state management from TabContents:
it now resides off by itself in BrowserOnlineStateObserver, a tiny class
owned by BrowserProcessImpl.

This is an attempt to re-land r91390 without the OnProcessLaunched IPC
(since r92062 solved that in a different way by using WebPreferences).
The previous commit was reverted due to missing message_loop.h includes.

[email protected]

Review URL: http://codereview.chromium.org/7343011

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@92233 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/browser_process_impl.cc b/chrome/browser/browser_process_impl.cc
index 8455db0f..d554f7e 100644
--- a/chrome/browser/browser_process_impl.cc
+++ b/chrome/browser/browser_process_impl.cc
@@ -73,6 +73,7 @@
 #include "content/browser/debugger/devtools_manager.h"
 #include "content/browser/debugger/devtools_protocol_handler.h"
 #include "content/browser/gpu/gpu_process_host_ui_shim.h"
+#include "content/browser/net/browser_online_state_observer.h"
 #include "content/browser/plugin_service.h"
 #include "content/browser/renderer_host/render_process_host.h"
 #include "content/browser/renderer_host/resource_dispatcher_host.h"
@@ -147,6 +148,8 @@
   extension_event_router_forwarder_ = new ExtensionEventRouterForwarder;
 
   ExtensionTabIdMap::GetInstance()->Init();
+
+  online_state_observer_.reset(new BrowserOnlineStateObserver);
 }
 
 BrowserProcessImpl::~BrowserProcessImpl() {