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); | |
3744 | 3743 |
3745 // Page-related commands | 3744 // Page-related commands |
3746 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); | 3745 command_updater_.UpdateCommandEnabled(IDC_EMAIL_PAGE_LOCATION, true); |
3747 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); | 3746 command_updater_.UpdateCommandEnabled(IDC_ENCODING_AUTO_DETECT, true); |
3748 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF8, true); | 3747 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF8, true); |
3749 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF16LE, true); | 3748 command_updater_.UpdateCommandEnabled(IDC_ENCODING_UTF16LE, true); |
3750 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88591, true); | 3749 command_updater_.UpdateCommandEnabled(IDC_ENCODING_ISO88591, true); |
3751 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1252, true); | 3750 command_updater_.UpdateCommandEnabled(IDC_ENCODING_WINDOWS1252, true); |
3752 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GBK, true); | 3751 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GBK, true); |
3753 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GB18030, true); | 3752 command_updater_.UpdateCommandEnabled(IDC_ENCODING_GB18030, true); |
(...skipping 859 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4613 TabContents* current_tab = GetSelectedTabContents(); | 4612 TabContents* current_tab = GetSelectedTabContents(); |
4614 if (current_tab) { | 4613 if (current_tab) { |
4615 content_restrictions = current_tab->content_restrictions(); | 4614 content_restrictions = current_tab->content_restrictions(); |
4616 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); | 4615 NavigationEntry* active_entry = current_tab->controller().GetActiveEntry(); |
4617 // See comment in UpdateCommandsForTabState about why we call url(). | 4616 // See comment in UpdateCommandsForTabState about why we call url(). |
4618 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) | 4617 if (!SavePackage::IsSavableURL(active_entry ? active_entry->url() : GURL())) |
4619 content_restrictions |= CONTENT_RESTRICTION_SAVE; | 4618 content_restrictions |= CONTENT_RESTRICTION_SAVE; |
4620 } | 4619 } |
4621 return content_restrictions; | 4620 return content_restrictions; |
4622 } | 4621 } |
OLD | NEW |