OLD | NEW |
---|---|
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 1128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1139 if (!core_tab_helper) | 1139 if (!core_tab_helper) |
1140 return false; | 1140 return false; |
1141 | 1141 |
1142 CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate(); | 1142 CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate(); |
1143 return !core_delegate || | 1143 return !core_delegate || |
1144 core_delegate->CanReloadContents(embedder_web_contents_); | 1144 core_delegate->CanReloadContents(embedder_web_contents_); |
1145 } | 1145 } |
1146 | 1146 |
1147 case IDC_VIEW_SOURCE: | 1147 case IDC_VIEW_SOURCE: |
1148 case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE: | 1148 case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE: |
1149 // If we're viewing in a MimeHandlerViewGuest source should not be shown. | |
AKV
2015/09/05 11:15:32
Please protect it using ENABLE_EXTENSIONS flag.
Deepak
2015/09/05 11:52:14
Done.
| |
1150 if (extensions::MimeHandlerViewGuest::FromWebContents( | |
1151 source_web_contents_)) { | |
AKV
2015/09/05 11:15:32
Please indent to 4 spaces instead of 8
Deepak
2015/09/05 11:52:14
Done.
| |
1152 return false; | |
AKV
2015/09/05 11:15:32
nit: single line body block doesn't need braces.
Deepak
2015/09/05 11:52:14
Done.
| |
1153 } | |
1149 return embedder_web_contents_->GetController().CanViewSource(); | 1154 return embedder_web_contents_->GetController().CanViewSource(); |
1150 | 1155 |
1151 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: | 1156 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: |
1152 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE: | 1157 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE: |
1153 case IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP: | 1158 case IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP: |
1154 case IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP: | 1159 case IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP: |
1155 return IsDevCommandEnabled(id); | 1160 return IsDevCommandEnabled(id); |
1156 | 1161 |
1157 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: | 1162 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: |
1158 if (embedder_web_contents_->GetController().GetVisibleEntry() == NULL) | 1163 if (embedder_web_contents_->GetController().GetVisibleEntry() == NULL) |
(...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
1947 source_web_contents_->GetRenderViewHost()-> | 1952 source_web_contents_->GetRenderViewHost()-> |
1948 ExecuteMediaPlayerActionAtLocation(location, action); | 1953 ExecuteMediaPlayerActionAtLocation(location, action); |
1949 } | 1954 } |
1950 | 1955 |
1951 void RenderViewContextMenu::PluginActionAt( | 1956 void RenderViewContextMenu::PluginActionAt( |
1952 const gfx::Point& location, | 1957 const gfx::Point& location, |
1953 const WebPluginAction& action) { | 1958 const WebPluginAction& action) { |
1954 source_web_contents_->GetRenderViewHost()-> | 1959 source_web_contents_->GetRenderViewHost()-> |
1955 ExecutePluginActionAtLocation(location, action); | 1960 ExecutePluginActionAtLocation(location, action); |
1956 } | 1961 } |
OLD | NEW |