Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(156)

Side by Side Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 1389273003: 'View source code' option should be disabled in context menu for 'Paper Toolbar' of 'Pdf Viewer" (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/renderer_context_menu/render_view_context_menu.h" 5 #include "chrome/browser/renderer_context_menu/render_view_context_menu.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <set> 8 #include <set>
9 #include <utility> 9 #include <utility>
10 10
(...skipping 1135 matching lines...) Expand 10 before | Expand all | Expand 10 after
1146 if (!core_tab_helper) 1146 if (!core_tab_helper)
1147 return false; 1147 return false;
1148 1148
1149 CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate(); 1149 CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate();
1150 return !core_delegate || 1150 return !core_delegate ||
1151 core_delegate->CanReloadContents(embedder_web_contents_); 1151 core_delegate->CanReloadContents(embedder_web_contents_);
1152 } 1152 }
1153 1153
1154 case IDC_VIEW_SOURCE: 1154 case IDC_VIEW_SOURCE:
1155 case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE: 1155 case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE:
1156 if (!!extensions::MimeHandlerViewGuest::FromWebContents(
1157 source_web_contents_)) {
1158 return false;
1159 }
1156 return (params_.media_type != WebContextMenuData::MediaTypePlugin) && 1160 return (params_.media_type != WebContextMenuData::MediaTypePlugin) &&
1157 embedder_web_contents_->GetController().CanViewSource(); 1161 embedder_web_contents_->GetController().CanViewSource();
1158 1162
1159 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: 1163 case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
1160 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE: 1164 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE:
1161 case IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP: 1165 case IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP:
1162 case IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP: 1166 case IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP:
1163 return IsDevCommandEnabled(id); 1167 return IsDevCommandEnabled(id);
1164 1168
1165 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: 1169 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO:
(...skipping 811 matching lines...) Expand 10 before | Expand all | Expand 10 after
1977 source_web_contents_->GetRenderViewHost()-> 1981 source_web_contents_->GetRenderViewHost()->
1978 ExecuteMediaPlayerActionAtLocation(location, action); 1982 ExecuteMediaPlayerActionAtLocation(location, action);
1979 } 1983 }
1980 1984
1981 void RenderViewContextMenu::PluginActionAt( 1985 void RenderViewContextMenu::PluginActionAt(
1982 const gfx::Point& location, 1986 const gfx::Point& location,
1983 const WebPluginAction& action) { 1987 const WebPluginAction& action) {
1984 source_web_contents_->GetRenderViewHost()-> 1988 source_web_contents_->GetRenderViewHost()->
1985 ExecutePluginActionAtLocation(location, action); 1989 ExecutePluginActionAtLocation(location, action);
1986 } 1990 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698