diff options
author | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 06:52:35 +0000 |
---|---|---|
committer | brettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-04-28 06:52:35 +0000 |
commit | 329581b6dbfa4ad0ca1013d0407e202b8dffed77 (patch) | |
tree | 8a6832ac64e99760cb07b74a08896f7a41def051 /chrome/browser/tab_contents | |
parent | 6faa0e0d23ca6fc27ae603063ce23eb018a670cd (diff) | |
download | chromium_src-329581b6dbfa4ad0ca1013d0407e202b8dffed77.zip chromium_src-329581b6dbfa4ad0ca1013d0407e202b8dffed77.tar.gz chromium_src-329581b6dbfa4ad0ca1013d0407e202b8dffed77.tar.bz2 |
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
Diffstat (limited to 'chrome/browser/tab_contents')
-rw-r--r-- | chrome/browser/tab_contents/render_view_host_manager.h | 2 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.cc | 5 | ||||
-rw-r--r-- | chrome/browser/tab_contents/tab_contents.h | 8 |
3 files changed, 8 insertions, 7 deletions
diff --git a/chrome/browser/tab_contents/render_view_host_manager.h b/chrome/browser/tab_contents/render_view_host_manager.h index 15ee081..a91d488 100644 --- a/chrome/browser/tab_contents/render_view_host_manager.h +++ b/chrome/browser/tab_contents/render_view_host_manager.h @@ -42,7 +42,7 @@ class RenderViewHostManager : public NotificationObserver { virtual void BeforeUnloadFiredFromRenderManager( bool proceed, bool* proceed_to_fire_unload) = 0; virtual void DidStartLoadingFromRenderManager( - RenderViewHost* render_view_host, int32 page_id) = 0; + RenderViewHost* render_view_host) = 0; virtual void RenderViewGoneFromRenderManager( RenderViewHost* render_view_host) = 0; virtual void UpdateRenderViewSizeForRenderManager() = 0; diff --git a/chrome/browser/tab_contents/tab_contents.cc b/chrome/browser/tab_contents/tab_contents.cc index f11a3c9..a74373d 100644 --- a/chrome/browser/tab_contents/tab_contents.cc +++ b/chrome/browser/tab_contents/tab_contents.cc @@ -1155,6 +1155,7 @@ void TabContents::SetIsLoading(bool is_loading, if (delegate_) delegate_->LoadingStateChanged(this); + NotifyNavigationStateChanged(INVALIDATE_LOAD); NotificationType type = is_loading ? NotificationType::LOAD_START : NotificationType::LOAD_STOP; @@ -1781,11 +1782,11 @@ void TabContents::RequestMove(const gfx::Rect& new_bounds) { 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(); diff --git a/chrome/browser/tab_contents/tab_contents.h b/chrome/browser/tab_contents/tab_contents.h index 8630e42..6a8b83f 100644 --- a/chrome/browser/tab_contents/tab_contents.h +++ b/chrome/browser/tab_contents/tab_contents.h @@ -751,8 +751,8 @@ class TabContents : public PageNavigator, const ThumbnailScore& score); virtual void Close(RenderViewHost* render_view_host); virtual void RequestMove(const gfx::Rect& new_bounds); - virtual void DidStartLoading(RenderViewHost* render_view_host, int32 page_id); - virtual void DidStopLoading(RenderViewHost* render_view_host, int32 page_id); + virtual void DidStartLoading(RenderViewHost* render_view_host); + virtual void DidStopLoading(RenderViewHost* render_view_host); virtual void DidStartProvisionalLoadForFrame(RenderViewHost* render_view_host, bool is_main_frame, const GURL& url); @@ -853,8 +853,8 @@ class TabContents : public PageNavigator, bool proceed, bool* proceed_to_fire_unload); virtual void DidStartLoadingFromRenderManager( - RenderViewHost* render_view_host, int32 page_id) { - DidStartLoading(render_view_host, page_id); + RenderViewHost* render_view_host) { + DidStartLoading(render_view_host); } virtual void RenderViewGoneFromRenderManager( RenderViewHost* render_view_host) { |