A prototype of resource loading through automation

In a test scenario where we need to load resources over
automation, we intercept the URL reqeusts and serve
them using automation IPCs.

This resource loading can be enabled per tab created
by automation. 

BUG=none
TEST=none

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

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20267 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index de13654..b417f344 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -1714,6 +1714,11 @@
 }
 
 void TabContents::RenderViewCreated(RenderViewHost* render_view_host) {
+  NotificationService::current()->Notify(
+      NotificationType::RENDER_VIEW_HOST_CREATED_FOR_TAB,
+      Source<TabContents>(this),
+      Details<RenderViewHost>(render_view_host));
+
   NavigationEntry* entry = controller_.GetActiveEntry();
   if (!entry)
     return;
@@ -1764,6 +1769,13 @@
   HungRendererDialog::HideForTabContents(this);
 }
 
+void TabContents::RenderViewDeleted(RenderViewHost* rvh) {
+  NotificationService::current()->Notify(
+      NotificationType::RENDER_VIEW_HOST_DELETED,
+      Source<TabContents>(this),
+      Details<RenderViewHost>(rvh));
+}
+
 void TabContents::DidNavigate(RenderViewHost* rvh,
                               const ViewHostMsg_FrameNavigate_Params& params) {
   if (PageTransition::IsMainFrame(params.transition))