Synchronously update the loading state when a load starts so that the UI will
be more responsive and the loading state won't be out-of-sync with anything
else. This also removes the synchronous update to the throbber when we load a
URL because this happens before the loda actually starts, giving a flash of the
default favicon. The load start call made by RenderViewHost will cover this
case after the load actually starts.

BUG=11051
Review URL: http://codereview.chromium.org/100033

git-svn-id: svn://svn.chromium.org/chrome/trunk/src@14718 0039d316-1c4b-4281-b951-d872f2087c98
diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc
index f11a3c93..a74373d 100644
--- a/chrome/browser/tab_contents/tab_contents.cc
+++ b/chrome/browser/tab_contents/tab_contents.cc
@@ -1155,6 +1155,7 @@
 
   if (delegate_)
     delegate_->LoadingStateChanged(this);
+  NotifyNavigationStateChanged(INVALIDATE_LOAD);
 
   NotificationType type = is_loading ? NotificationType::LOAD_START :
       NotificationType::LOAD_STOP;
@@ -1781,11 +1782,11 @@
     delegate()->MoveContents(this, new_bounds);
 }
 
-void TabContents::DidStartLoading(RenderViewHost* rvh, int32 page_id) {
+void TabContents::DidStartLoading(RenderViewHost* rvh) {
   SetIsLoading(true, NULL);
 }
 
-void TabContents::DidStopLoading(RenderViewHost* rvh, int32 page_id) {
+void TabContents::DidStopLoading(RenderViewHost* rvh) {
   scoped_ptr<LoadNotificationDetails> details;
 
   NavigationEntry* entry = controller_.GetActiveEntry();