summaryrefslogtreecommitdiffstats
path: root/chrome/browser/browser.cc
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 18:05:16 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-01-15 18:05:16 +0000
commit31682283d0eefd0b64065144478b0b6a4eda093e (patch)
treeef12420b8f1dd403c748ad9673a6f57df7a59ace /chrome/browser/browser.cc
parentc651176e09906e3aa6986e282011babe4ed8777e (diff)
downloadchromium_src-31682283d0eefd0b64065144478b0b6a4eda093e.zip
chromium_src-31682283d0eefd0b64065144478b0b6a4eda093e.tar.gz
chromium_src-31682283d0eefd0b64065144478b0b6a4eda093e.tar.bz2
Enable the context menu and developer menu "View source" items at the same time.
This fixes issue 2028 which didn't enable the context menu item for new tabs. BUG=2028 TEST=Open a new tab and verify that the 'View page source' context menu is enabled. Original review: http://codereview.chromium.org/541016 Patch by Aaron Kemp git-svn-id: svn://svn.chromium.org/chrome/trunk/src@36367 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/browser.cc')
-rw-r--r--chrome/browser/browser.cc7
1 files changed, 1 insertions, 6 deletions
diff --git a/chrome/browser/browser.cc b/chrome/browser/browser.cc
index 0cfbe13..0f00ab4 100644
--- a/chrome/browser/browser.cc
+++ b/chrome/browser/browser.cc
@@ -73,7 +73,6 @@
#include "grit/locale_settings.h"
#include "net/base/cookie_monster.h"
#include "net/base/cookie_policy.h"
-#include "net/base/mime_util.h"
#include "net/base/net_util.h"
#include "net/base/registry_controlled_domain.h"
#include "net/url_request/url_request_context.h"
@@ -2630,9 +2629,6 @@ void Browser::UpdateCommandsForTabState() {
// Current navigation entry, may be NULL.
NavigationEntry* active_entry = current_tab->controller().GetActiveEntry();
- bool is_source_viewable =
- net::IsSupportedNonImageMimeType(
- current_tab->contents_mime_type().c_str());
// Page-related commands
window_->SetStarredState(current_tab->is_starred());
@@ -2642,8 +2638,7 @@ void Browser::UpdateCommandsForTabState() {
// View-source should not be enabled if already in view-source mode or
// the source is not viewable.
command_updater_.UpdateCommandEnabled(IDC_VIEW_SOURCE,
- active_entry && !active_entry->IsViewSourceMode() &&
- is_source_viewable);
+ current_tab->controller().CanViewSource());
// Instead of using GetURL here, we use url() (which is the "real" url of the
// page) from the NavigationEntry because its reflects their origin rather