diff options
Diffstat (limited to 'chrome/common/temp_scaffolding_stubs.cc')
-rw-r--r-- | chrome/common/temp_scaffolding_stubs.cc | 21 |
1 files changed, 20 insertions, 1 deletions
diff --git a/chrome/common/temp_scaffolding_stubs.cc b/chrome/common/temp_scaffolding_stubs.cc index 9aeda0f..aee4fbf 100644 --- a/chrome/common/temp_scaffolding_stubs.cc +++ b/chrome/common/temp_scaffolding_stubs.cc @@ -318,8 +318,27 @@ void TabContents::OpenURL(const GURL& url, const GURL& referrer, void TabContents::SetIsLoading(bool is_loading, LoadNotificationDetails* details) { - // TODO(port): this is a subset of SetIsLoading() as a stub + if (is_loading == is_loading_) + return; + is_loading_ = is_loading; + waiting_for_response_ = is_loading; + + // Suppress notifications for this TabContents if we are not active. + if (!is_active_) + return; + + if (delegate_) + delegate_->LoadingStateChanged(this); + + NotificationType type = is_loading ? NotificationType::LOAD_START : + NotificationType::LOAD_STOP; + NotificationDetails det = NotificationService::NoDetails();; + if (details) + det = Details<LoadNotificationDetails>(details); + NotificationService::current()->Notify(type, + Source<NavigationController>(this->controller()), + det); } bool TabContents::SupportsURL(GURL* url) { |