Chromium Code Reviews| Index: chrome/browser/tab_contents/render_view_context_menu.cc |
| =================================================================== |
| --- chrome/browser/tab_contents/render_view_context_menu.cc (revision 218359) |
| +++ chrome/browser/tab_contents/render_view_context_menu.cc (working copy) |
| @@ -865,7 +865,8 @@ |
| const TemplateURL* const default_provider = |
| TemplateURLServiceFactory::GetForProfile(profile_)-> |
| GetDefaultSearchProvider(); |
| - if (default_provider && !default_provider->image_url().empty() && |
| + if (params_.has_image_contents && default_provider && |
| + !default_provider->image_url().empty() && |
| default_provider->image_url_ref().IsValid()) { |
| menu_model_.AddItem( |
| IDC_CONTENT_CONTEXT_SEARCHWEBFORIMAGE, |
| @@ -1288,7 +1289,7 @@ |
| (params_.src_url.scheme() != chrome::kChromeUIScheme); |
| case IDC_CONTENT_CONTEXT_COPYIMAGE: |
| - return !params_.is_image_blocked; |
| + return params_.has_image_contents; |
| // Media control commands should all be disabled if the player is in an |
| // error state. |
| @@ -1363,7 +1364,6 @@ |
| // the page) from the NavigationEntry because its reflects their origin |
| // rather than the display one (returned by GetURL) which may be |
| // different (like having "view-source:" on the front). |
| - // TODO(nasko): Audit all GetActiveEntry calls in this file. |
| NavigationEntry* active_entry = |
| source_web_contents_->GetController().GetActiveEntry(); |
| return content::IsSavableURL( |
| @@ -1797,9 +1797,7 @@ |
| case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: { |
| NavigationController* controller = &source_web_contents_->GetController(); |
| - // Important to use GetVisibleEntry to match what's showing in the |
| - // omnibox. |
| - NavigationEntry* nav_entry = controller->GetVisibleEntry(); |
| + NavigationEntry* nav_entry = controller->GetActiveEntry(); |
|
Peter Kasting
2013/08/20 18:33:16
Is this change correct? It looks surprising to me
|
| Browser* browser = |
| chrome::FindBrowserWithWebContents(source_web_contents_); |
| chrome::ShowWebsiteSettings(browser, source_web_contents_, |