| Index: chrome/browser/ui/browser_commands.cc
|
| diff --git a/chrome/browser/ui/browser_commands.cc b/chrome/browser/ui/browser_commands.cc
|
| index c1e1a0963de00ed4ab94f38a340f7670c971df92..5b8b763962891aa6a4f9c4705d7d7dadafc20c70 100644
|
| --- a/chrome/browser/ui/browser_commands.cc
|
| +++ b/chrome/browser/ui/browser_commands.cc
|
| @@ -253,7 +253,7 @@ int GetContentRestrictions(const Browser* browser) {
|
| CoreTabHelper::FromWebContents(current_tab);
|
| content_restrictions = core_tab_helper->content_restrictions();
|
| NavigationEntry* active_entry =
|
| - current_tab->GetController().GetActiveEntry();
|
| + current_tab->GetController().GetVisibleEntry();
|
| // See comment in UpdateCommandsForTabState about why we call url().
|
| if (!content::IsSavableURL(
|
| active_entry ? active_entry->GetURL() : GURL()) ||
|
| @@ -957,7 +957,7 @@ void ToggleSpeechInput(Browser* browser) {
|
| bool CanRequestTabletSite(WebContents* current_tab) {
|
| if (!current_tab)
|
| return false;
|
| - return current_tab->GetController().GetActiveEntry() != NULL;
|
| + return current_tab->GetController().GetVisibleEntry() != NULL;
|
| }
|
|
|
| bool IsRequestingTabletSite(Browser* browser) {
|
| @@ -965,7 +965,7 @@ bool IsRequestingTabletSite(Browser* browser) {
|
| if (!current_tab)
|
| return false;
|
| content::NavigationEntry* entry =
|
| - current_tab->GetController().GetActiveEntry();
|
| + current_tab->GetController().GetVisibleEntry();
|
| if (!entry)
|
| return false;
|
| return entry->GetIsOverridingUserAgent();
|
| @@ -976,7 +976,7 @@ void ToggleRequestTabletSite(Browser* browser) {
|
| if (!current_tab)
|
| return;
|
| NavigationController& controller = current_tab->GetController();
|
| - NavigationEntry* entry = controller.GetActiveEntry();
|
| + NavigationEntry* entry = controller.GetVisibleEntry();
|
| if (!entry)
|
| return;
|
| if (entry->GetIsOverridingUserAgent()) {
|
| @@ -1037,7 +1037,7 @@ void ViewSource(Browser* browser,
|
| DCHECK(view_source_contents->GetController().CanPruneAllButVisible());
|
| view_source_contents->GetController().PruneAllButVisible();
|
| NavigationEntry* active_entry =
|
| - view_source_contents->GetController().GetActiveEntry();
|
| + view_source_contents->GetController().GetVisibleEntry();
|
| if (!active_entry)
|
| return;
|
|
|
| @@ -1113,7 +1113,7 @@ bool CanCreateApplicationShortcuts(const Browser* browser) {
|
|
|
| void ConvertTabToAppWindow(Browser* browser,
|
| content::WebContents* contents) {
|
| - const GURL& url = contents->GetController().GetActiveEntry()->GetURL();
|
| + const GURL& url = contents->GetController().GetVisibleEntry()->GetURL();
|
| std::string app_name = web_app::GenerateApplicationNameFromURL(url);
|
|
|
| int index = browser->tab_strip_model()->GetIndexOfWebContents(contents);
|
|
|