Index: content/shell/browser/shell.cc |
diff --git a/content/shell/browser/shell.cc b/content/shell/browser/shell.cc |
index 65491237ab7dea5c96a6478c50c9bb432274e85f..b19ad1f313721f2fdc7c02259a96348ef1ca4110 100644 |
--- a/content/shell/browser/shell.cc |
+++ b/content/shell/browser/shell.cc |
@@ -205,13 +205,14 @@ void Shell::Stop() { |
web_contents_->GetView()->Focus(); |
} |
-void Shell::UpdateNavigationControls() { |
+void Shell::UpdateNavigationControls(bool to_different_document) { |
int current_index = web_contents_->GetController().GetCurrentEntryIndex(); |
int max_index = web_contents_->GetController().GetEntryCount() - 1; |
PlatformEnableUIControl(BACK_BUTTON, current_index > 0); |
PlatformEnableUIControl(FORWARD_BUTTON, current_index < max_index); |
- PlatformEnableUIControl(STOP_BUTTON, web_contents_->IsLoading()); |
+ PlatformEnableUIControl(STOP_BUTTON, |
+ to_different_document && web_contents_->IsLoading()); |
} |
void Shell::ShowDevTools() { |
@@ -266,8 +267,9 @@ WebContents* Shell::OpenURLFromTab(WebContents* source, |
return source; |
} |
-void Shell::LoadingStateChanged(WebContents* source) { |
- UpdateNavigationControls(); |
+void Shell::LoadingStateChanged(WebContents* source, |
+ bool to_different_document) { |
+ UpdateNavigationControls(to_different_document); |
PlatformSetIsLoading(source->IsLoading()); |
} |