| OLD | NEW |
| 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "chrome/browser/ui/browser.h" | 5 #include "chrome/browser/ui/browser.h" |
| 6 | 6 |
| 7 #if defined(OS_WIN) | 7 #if defined(OS_WIN) |
| 8 #include <shellapi.h> | 8 #include <shellapi.h> |
| 9 #include <windows.h> | 9 #include <windows.h> |
| 10 #endif // OS_WIN | 10 #endif // OS_WIN |
| (...skipping 3722 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3733 command_updater_.UpdateCommandEnabled( | 3733 command_updater_.UpdateCommandEnabled( |
| 3734 IDC_NEW_INCOGNITO_WINDOW, | 3734 IDC_NEW_INCOGNITO_WINDOW, |
| 3735 profile_->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled)); | 3735 profile_->GetPrefs()->GetBoolean(prefs::kIncognitoEnabled)); |
| 3736 command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true); | 3736 command_updater_.UpdateCommandEnabled(IDC_CLOSE_WINDOW, true); |
| 3737 command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true); | 3737 command_updater_.UpdateCommandEnabled(IDC_NEW_TAB, true); |
| 3738 command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true); | 3738 command_updater_.UpdateCommandEnabled(IDC_CLOSE_TAB, true); |
| 3739 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, true); | 3739 command_updater_.UpdateCommandEnabled(IDC_DUPLICATE_TAB, true); |
| 3740 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB, false); | 3740 command_updater_.UpdateCommandEnabled(IDC_RESTORE_TAB, false); |
| 3741 command_updater_.UpdateCommandEnabled(IDC_EXIT, true); | 3741 command_updater_.UpdateCommandEnabled(IDC_EXIT, true); |
| 3742 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_VERTICAL_TABS, true); | 3742 command_updater_.UpdateCommandEnabled(IDC_TOGGLE_VERTICAL_TABS, true); |
| 3743 command_updater_.UpdateCommandEnabled(IDC_DEBUG_FRAME_TOGGLE, true); |
| 3743 | 3744 |
| 3744 // Page-related commands | 3745 // Page-related commands |
| 3745 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); | 3746 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); |
| 3746 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); | 3747 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); |
| 3747 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF8, true); | 3748 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF8, true); |
| 3748 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF16LE, true); | 3749 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF16LE, true); |
| 3749 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88591, true); | 3750 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88591, true); |
| 3750 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1252, true); | 3751 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1252, true); |
| 3751 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GBK, true); | 3752 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GBK, true); |
| 3752 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GB18030, true); | 3753 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GB18030, true); |
| (...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4612 TabContents* current_tab = GetSelectedTabContents(); | 4613 TabContents* current_tab = GetSelectedTabContents(); |
| 4613 if (current_tab) { | 4614 if (current_tab) { |
| 4614 content_restrictions = current_tab->content_restrictions(); | 4615 content_restrictions = current_tab->content_restrictions(); |
| 4615 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); | 4616 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); |
| 4616 // See comment in UpdateCommandsForTabState about why we call url(). | 4617 // See comment in UpdateCommandsForTabState about why we call url(). |
| 4617 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) | 4618 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) |
| 4618 content_restrictions |= CONTENT_RESTRICTION_SAVE; | 4619 content_restrictions |= CONTENT_RESTRICTION_SAVE; |
| 4619 } | 4620 } |
| 4620 return content_restrictions; | 4621 return content_restrictions; |
| 4621 } | 4622 } |
| OLD | NEW |