Chromium Code Reviews| 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 (chrome::FindBrowserWithWebContents(embedder_web_contents_) == NULL) | |
|
Avi (use Gerrit)
2015/09/01 04:06:12
nullptr
Deepak
2015/09/01 05:24:59
Done.
| |
| 1150 return false; | |
| 1149 return embedder_web_contents_->GetController().CanViewSource(); | 1151 return embedder_web_contents_->GetController().CanViewSource(); |
| 1150 | 1152 |
| 1151 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: | 1153 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: |
| 1152 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE: | 1154 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE: |
| 1153 case IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP: | 1155 case IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP: |
| 1154 case IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP: | 1156 case IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP: |
| 1155 return IsDevCommandEnabled(id); | 1157 return IsDevCommandEnabled(id); |
| 1156 | 1158 |
| 1157 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: | 1159 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: |
| 1158 if (embedder_web_contents_->GetController().GetVisibleEntry() == NULL) | 1160 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()-> | 1949 source_web_contents_->GetRenderViewHost()-> |
| 1948 ExecuteMediaPlayerActionAtLocation(location, action); | 1950 ExecuteMediaPlayerActionAtLocation(location, action); |
| 1949 } | 1951 } |
| 1950 | 1952 |
| 1951 void RenderViewContextMenu::PluginActionAt( | 1953 void RenderViewContextMenu::PluginActionAt( |
| 1952 const gfx::Point& location, | 1954 const gfx::Point& location, |
| 1953 const WebPluginAction& action) { | 1955 const WebPluginAction& action) { |
| 1954 source_web_contents_->GetRenderViewHost()-> | 1956 source_web_contents_->GetRenderViewHost()-> |
| 1955 ExecutePluginActionAtLocation(location, action); | 1957 ExecutePluginActionAtLocation(location, action); |
| 1956 } | 1958 } |
| OLD | NEW |