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

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

Issue 931073002: Fix for Incomplete context menu shown in PDF. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 | components/renderer_context_menu/render_view_context_menu_base.cc » ('j') | 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 69 matching lines...) Expand 10 before | Expand all | Expand 10 after
80 #include "content/public/browser/render_process_host.h" 80 #include "content/public/browser/render_process_host.h"
81 #include "content/public/browser/render_view_host.h" 81 #include "content/public/browser/render_view_host.h"
82 #include "content/public/browser/render_widget_host_view.h" 82 #include "content/public/browser/render_widget_host_view.h"
83 #include "content/public/browser/user_metrics.h" 83 #include "content/public/browser/user_metrics.h"
84 #include "content/public/browser/web_contents.h" 84 #include "content/public/browser/web_contents.h"
85 #include "content/public/common/menu_item.h" 85 #include "content/public/common/menu_item.h"
86 #include "content/public/common/ssl_status.h" 86 #include "content/public/common/ssl_status.h"
87 #include "content/public/common/url_utils.h" 87 #include "content/public/common/url_utils.h"
88 #include "extensions/browser/extension_host.h" 88 #include "extensions/browser/extension_host.h"
89 #include "extensions/browser/extension_system.h" 89 #include "extensions/browser/extension_system.h"
90 #include "extensions/browser/guest_view/mime_handler_view/mime_handler_view_gues t.h"
90 #include "extensions/browser/guest_view/web_view/web_view_guest.h" 91 #include "extensions/browser/guest_view/web_view/web_view_guest.h"
91 #include "extensions/browser/view_type_utils.h" 92 #include "extensions/browser/view_type_utils.h"
92 #include "extensions/common/extension.h" 93 #include "extensions/common/extension.h"
93 #include "net/base/escape.h" 94 #include "net/base/escape.h"
94 #include "third_party/WebKit/public/web/WebContextMenuData.h" 95 #include "third_party/WebKit/public/web/WebContextMenuData.h"
95 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h" 96 #include "third_party/WebKit/public/web/WebMediaPlayerAction.h"
96 #include "third_party/WebKit/public/web/WebPluginAction.h" 97 #include "third_party/WebKit/public/web/WebPluginAction.h"
97 #include "ui/base/clipboard/clipboard.h" 98 #include "ui/base/clipboard/clipboard.h"
98 #include "ui/base/l10n/l10n_util.h" 99 #include "ui/base/l10n/l10n_util.h"
99 #include "ui/gfx/favicon_size.h" 100 #include "ui/gfx/favicon_size.h"
(...skipping 189 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 290
290 content::Referrer CreateSaveAsReferrer( 291 content::Referrer CreateSaveAsReferrer(
291 const GURL& url, 292 const GURL& url,
292 const content::ContextMenuParams& params) { 293 const content::ContextMenuParams& params) {
293 const GURL& referring_url = GetDocumentURL(params); 294 const GURL& referring_url = GetDocumentURL(params);
294 return content::Referrer::SanitizeForRequest( 295 return content::Referrer::SanitizeForRequest(
295 url, 296 url,
296 content::Referrer(referring_url.GetAsReferrer(), params.referrer_policy)); 297 content::Referrer(referring_url.GetAsReferrer(), params.referrer_policy));
297 } 298 }
298 299
300 content::WebContents* GetWebContentsToUse(content::WebContents* web_contents) {
301 // If we're viewing in a MimeHandlerViewGuest, use its embedder WebContents.
302 auto guest_view =
303 extensions::MimeHandlerViewGuest::FromWebContents(web_contents);
304 if (guest_view)
305 return guest_view->embedder_web_contents();
306 return web_contents;
307 }
308
299 bool g_custom_id_ranges_initialized = false; 309 bool g_custom_id_ranges_initialized = false;
300 310
301 const int kSpellcheckRadioGroup = 1; 311 const int kSpellcheckRadioGroup = 1;
302 312
303 } // namespace 313 } // namespace
304 314
305 // static 315 // static
306 bool RenderViewContextMenu::IsDevToolsURL(const GURL& url) { 316 bool RenderViewContextMenu::IsDevToolsURL(const GURL& url) {
307 return url.SchemeIs(content::kChromeDevToolsScheme); 317 return url.SchemeIs(content::kChromeDevToolsScheme);
308 } 318 }
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
755 IDS_CONTENT_CONTEXT_UNMUTE : 765 IDS_CONTENT_CONTEXT_UNMUTE :
756 IDS_CONTENT_CONTEXT_MUTE); 766 IDS_CONTENT_CONTEXT_MUTE);
757 767
758 menu_model_.AddCheckItemWithStringId(IDC_CONTENT_CONTEXT_LOOP, 768 menu_model_.AddCheckItemWithStringId(IDC_CONTENT_CONTEXT_LOOP,
759 IDS_CONTENT_CONTEXT_LOOP); 769 IDS_CONTENT_CONTEXT_LOOP);
760 menu_model_.AddCheckItemWithStringId(IDC_CONTENT_CONTEXT_CONTROLS, 770 menu_model_.AddCheckItemWithStringId(IDC_CONTENT_CONTEXT_CONTROLS,
761 IDS_CONTENT_CONTEXT_CONTROLS); 771 IDS_CONTENT_CONTEXT_CONTROLS);
762 } 772 }
763 773
764 void RenderViewContextMenu::AppendPluginItems() { 774 void RenderViewContextMenu::AppendPluginItems() {
765 if (params_.link_url.is_empty() && params_.selection_text.empty()) 775 if (params_.link_url.is_empty() && params_.selection_text.empty())
raymes 2015/02/18 00:39:46 As mentioned on my comment in the previous CL - I
766 AppendPageItems(); 776 AppendPageItems();
767 } 777 }
768 778
769 void RenderViewContextMenu::AppendPageItems() { 779 void RenderViewContextMenu::AppendPageItems() {
770 menu_model_.AddItemWithStringId(IDC_BACK, IDS_CONTENT_CONTEXT_BACK); 780 menu_model_.AddItemWithStringId(IDC_BACK, IDS_CONTENT_CONTEXT_BACK);
771 menu_model_.AddItemWithStringId(IDC_FORWARD, IDS_CONTENT_CONTEXT_FORWARD); 781 menu_model_.AddItemWithStringId(IDC_FORWARD, IDS_CONTENT_CONTEXT_FORWARD);
772 menu_model_.AddItemWithStringId(IDC_RELOAD, IDS_CONTENT_CONTEXT_RELOAD); 782 menu_model_.AddItemWithStringId(IDC_RELOAD, IDS_CONTENT_CONTEXT_RELOAD);
773 menu_model_.AddSeparator(ui::NORMAL_SEPARATOR); 783 menu_model_.AddSeparator(ui::NORMAL_SEPARATOR);
774 menu_model_.AddItemWithStringId(IDC_SAVE_PAGE, 784 menu_model_.AddItemWithStringId(IDC_SAVE_PAGE,
775 IDS_CONTENT_CONTEXT_SAVEPAGEAS); 785 IDS_CONTENT_CONTEXT_SAVEPAGEAS);
(...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after
992 1002
993 if (id >= IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_FIRST && 1003 if (id >= IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_FIRST &&
994 id <= IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_LAST) { 1004 id <= IDC_CONTENT_CONTEXT_PROTOCOL_HANDLER_LAST) {
995 return true; 1005 return true;
996 } 1006 }
997 1007
998 IncognitoModePrefs::Availability incognito_avail = 1008 IncognitoModePrefs::Availability incognito_avail =
999 IncognitoModePrefs::GetAvailability(prefs); 1009 IncognitoModePrefs::GetAvailability(prefs);
1000 switch (id) { 1010 switch (id) {
1001 case IDC_BACK: 1011 case IDC_BACK:
1002 return source_web_contents_->GetController().CanGoBack(); 1012 return GetWebContentsToUse(source_web_contents_)
Avi (use Gerrit) 2015/02/17 16:22:42 Can you pull GetWebContentsToUse(source_web_conten
1013 ->GetController().CanGoBack();
1003 1014
1004 case IDC_FORWARD: 1015 case IDC_FORWARD:
1005 return source_web_contents_->GetController().CanGoForward(); 1016 return GetWebContentsToUse(source_web_contents_)
1017 ->GetController().CanGoForward();
1006 1018
1007 case IDC_RELOAD: { 1019 case IDC_RELOAD: {
1008 CoreTabHelper* core_tab_helper = 1020 CoreTabHelper* core_tab_helper = CoreTabHelper::FromWebContents(
1009 CoreTabHelper::FromWebContents(source_web_contents_); 1021 GetWebContentsToUse(source_web_contents_));
1010 if (!core_tab_helper) 1022 if (!core_tab_helper)
1011 return false; 1023 return false;
1012 1024
1013 CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate(); 1025 CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate();
1014 return !core_delegate || 1026 return !core_delegate ||
1015 core_delegate->CanReloadContents(source_web_contents_); 1027 core_delegate->CanReloadContents(
1028 GetWebContentsToUse(source_web_contents_));
1016 } 1029 }
1017 1030
1018 case IDC_VIEW_SOURCE: 1031 case IDC_VIEW_SOURCE:
1019 case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE: 1032 case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE:
1020 return source_web_contents_->GetController().CanViewSource(); 1033 return GetWebContentsToUse(source_web_contents_)
1034 ->GetController().CanViewSource();
1021 1035
1022 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: 1036 case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
1023 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE: 1037 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE:
1024 case IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP: 1038 case IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP:
1025 case IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP: 1039 case IDC_CONTENT_CONTEXT_RESTART_PACKAGED_APP:
1026 return IsDevCommandEnabled(id); 1040 return IsDevCommandEnabled(id);
1027 1041
1028 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: 1042 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO:
1029 if (source_web_contents_->GetController().GetVisibleEntry() == NULL) 1043 if (GetWebContentsToUse(source_web_contents_)
1044 ->GetController().GetVisibleEntry() == NULL) {
1030 return false; 1045 return false;
1046 }
1031 // Disabled if no browser is associated (e.g. desktop notifications). 1047 // Disabled if no browser is associated (e.g. desktop notifications).
1032 if (chrome::FindBrowserWithWebContents(source_web_contents_) == NULL) 1048 if (chrome::FindBrowserWithWebContents(
1049 GetWebContentsToUse(source_web_contents_)) == NULL) {
1033 return false; 1050 return false;
1051 }
1034 return true; 1052 return true;
1035 1053
1036 case IDC_CONTENT_CONTEXT_TRANSLATE: { 1054 case IDC_CONTENT_CONTEXT_TRANSLATE: {
1037 ChromeTranslateClient* chrome_translate_client = 1055 ChromeTranslateClient* chrome_translate_client =
1038 ChromeTranslateClient::FromWebContents(source_web_contents_); 1056 ChromeTranslateClient::FromWebContents(source_web_contents_);
1039 if (!chrome_translate_client) 1057 if (!chrome_translate_client)
1040 return false; 1058 return false;
1041 std::string original_lang = 1059 std::string original_lang =
1042 chrome_translate_client->GetLanguageState().original_language(); 1060 chrome_translate_client->GetLanguageState().original_language();
1043 std::string target_lang = g_browser_process->GetApplicationLocale(); 1061 std::string target_lang = g_browser_process->GetApplicationLocale();
(...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after
1143 return can_save; 1161 return can_save;
1144 } 1162 }
1145 1163
1146 case IDC_CONTENT_CONTEXT_OPENAVNEWTAB: 1164 case IDC_CONTENT_CONTEXT_OPENAVNEWTAB:
1147 // Currently, a media element can be opened in a new tab iff it can 1165 // Currently, a media element can be opened in a new tab iff it can
1148 // be saved. So rather than duplicating the MediaCanSave flag, we rely 1166 // be saved. So rather than duplicating the MediaCanSave flag, we rely
1149 // on that here. 1167 // on that here.
1150 return !!(params_.media_flags & WebContextMenuData::MediaCanSave); 1168 return !!(params_.media_flags & WebContextMenuData::MediaCanSave);
1151 1169
1152 case IDC_SAVE_PAGE: { 1170 case IDC_SAVE_PAGE: {
1153 CoreTabHelper* core_tab_helper = 1171 CoreTabHelper* core_tab_helper = CoreTabHelper::FromWebContents(
1154 CoreTabHelper::FromWebContents(source_web_contents_); 1172 GetWebContentsToUse(source_web_contents_));
1155 if (!core_tab_helper) 1173 if (!core_tab_helper)
1156 return false; 1174 return false;
1157 1175
1158 CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate(); 1176 CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate();
1159 if (core_delegate && 1177 if (core_delegate && !core_delegate->CanSaveContents(
1160 !core_delegate->CanSaveContents(source_web_contents_)) 1178 GetWebContentsToUse(source_web_contents_))) {
1161 return false; 1179 return false;
1180 }
1162 1181
1163 PrefService* local_state = g_browser_process->local_state(); 1182 PrefService* local_state = g_browser_process->local_state();
1164 DCHECK(local_state); 1183 DCHECK(local_state);
1165 // Test if file-selection dialogs are forbidden by policy. 1184 // Test if file-selection dialogs are forbidden by policy.
1166 if (!local_state->GetBoolean(prefs::kAllowFileSelectionDialogs)) 1185 if (!local_state->GetBoolean(prefs::kAllowFileSelectionDialogs))
1167 return false; 1186 return false;
1168 1187
1169 // We save the last committed entry (which the user is looking at), as 1188 // We save the last committed entry (which the user is looking at), as
1170 // opposed to any pending URL that hasn't committed yet. 1189 // opposed to any pending URL that hasn't committed yet.
1171 NavigationEntry* entry = 1190 NavigationEntry* entry = GetWebContentsToUse(source_web_contents_)
1172 source_web_contents_->GetController().GetLastCommittedEntry(); 1191 ->GetController().GetLastCommittedEntry();
1173 return content::IsSavableURL(entry ? entry->GetURL() : GURL()); 1192 return content::IsSavableURL(entry ? entry->GetURL() : GURL());
1174 } 1193 }
1175 1194
1176 case IDC_CONTENT_CONTEXT_RELOADFRAME: 1195 case IDC_CONTENT_CONTEXT_RELOADFRAME:
1177 return params_.frame_url.is_valid(); 1196 return params_.frame_url.is_valid();
1178 1197
1179 case IDC_CONTENT_CONTEXT_UNDO: 1198 case IDC_CONTENT_CONTEXT_UNDO:
1180 return !!(params_.edit_flags & WebContextMenuData::CanUndo); 1199 return !!(params_.edit_flags & WebContextMenuData::CanUndo);
1181 1200
1182 case IDC_CONTENT_CONTEXT_REDO: 1201 case IDC_CONTENT_CONTEXT_REDO:
(...skipping 265 matching lines...) Expand 10 before | Expand all | Expand 10 after
1448 1467
1449 case IDC_CONTENT_CONTEXT_ROTATECCW: 1468 case IDC_CONTENT_CONTEXT_ROTATECCW:
1450 content::RecordAction( 1469 content::RecordAction(
1451 UserMetricsAction("PluginContextMenu_RotateCounterclockwise")); 1470 UserMetricsAction("PluginContextMenu_RotateCounterclockwise"));
1452 PluginActionAt( 1471 PluginActionAt(
1453 gfx::Point(params_.x, params_.y), 1472 gfx::Point(params_.x, params_.y),
1454 WebPluginAction(WebPluginAction::Rotate90Counterclockwise, true)); 1473 WebPluginAction(WebPluginAction::Rotate90Counterclockwise, true));
1455 break; 1474 break;
1456 1475
1457 case IDC_BACK: 1476 case IDC_BACK:
1458 source_web_contents_->GetController().GoBack(); 1477 GetWebContentsToUse(source_web_contents_)->GetController().GoBack();
1459 break; 1478 break;
1460 1479
1461 case IDC_FORWARD: 1480 case IDC_FORWARD:
1462 source_web_contents_->GetController().GoForward(); 1481 GetWebContentsToUse(source_web_contents_)->GetController().GoForward();
1463 break; 1482 break;
1464 1483
1465 case IDC_SAVE_PAGE: 1484 case IDC_SAVE_PAGE:
1466 source_web_contents_->OnSavePage(); 1485 GetWebContentsToUse(source_web_contents_)->OnSavePage();
1467 break; 1486 break;
1468 1487
1469 case IDC_RELOAD: 1488 case IDC_RELOAD:
1470 source_web_contents_->GetController().Reload(true); 1489 GetWebContentsToUse(source_web_contents_)->GetController().Reload(true);
1471 break; 1490 break;
1472 1491
1473 case IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP: { 1492 case IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP: {
1474 const Extension* platform_app = GetExtension(); 1493 const Extension* platform_app = GetExtension();
1475 DCHECK(platform_app); 1494 DCHECK(platform_app);
1476 DCHECK(platform_app->is_platform_app()); 1495 DCHECK(platform_app->is_platform_app());
1477 1496
1478 extensions::ExtensionSystem::Get(browser_context_) 1497 extensions::ExtensionSystem::Get(browser_context_)
1479 ->extension_service() 1498 ->extension_service()
1480 ->ReloadExtension(platform_app->id()); 1499 ->ReloadExtension(platform_app->id());
(...skipping 22 matching lines...) Expand all
1503 1522
1504 printing::StartPrint( 1523 printing::StartPrint(
1505 source_web_contents_, 1524 source_web_contents_,
1506 GetPrefs(browser_context_)->GetBoolean(prefs::kPrintPreviewDisabled), 1525 GetPrefs(browser_context_)->GetBoolean(prefs::kPrintPreviewDisabled),
1507 !params_.selection_text.empty()); 1526 !params_.selection_text.empty());
1508 #endif // ENABLE_PRINTING 1527 #endif // ENABLE_PRINTING
1509 break; 1528 break;
1510 } 1529 }
1511 1530
1512 case IDC_VIEW_SOURCE: 1531 case IDC_VIEW_SOURCE:
1513 source_web_contents_->ViewSource(); 1532 GetWebContentsToUse(source_web_contents_)->ViewSource();
1514 break; 1533 break;
1515 1534
1516 case IDC_CONTENT_CONTEXT_INSPECTELEMENT: 1535 case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
1517 Inspect(params_.x, params_.y); 1536 Inspect(params_.x, params_.y);
1518 break; 1537 break;
1519 1538
1520 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE: { 1539 case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE: {
1521 const Extension* platform_app = GetExtension(); 1540 const Extension* platform_app = GetExtension();
1522 DCHECK(platform_app); 1541 DCHECK(platform_app);
1523 DCHECK(platform_app->is_platform_app()); 1542 DCHECK(platform_app->is_platform_app());
1524 1543
1525 extensions::devtools_util::InspectBackgroundPage(platform_app, 1544 extensions::devtools_util::InspectBackgroundPage(platform_app,
1526 GetProfile()); 1545 GetProfile());
1527 break; 1546 break;
1528 } 1547 }
1529 1548
1530 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: { 1549 case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: {
1531 NavigationController* controller = &source_web_contents_->GetController(); 1550 NavigationController* controller =
1551 &GetWebContentsToUse(source_web_contents_)->GetController();
1532 // Important to use GetVisibleEntry to match what's showing in the 1552 // Important to use GetVisibleEntry to match what's showing in the
1533 // omnibox. This may return null. 1553 // omnibox. This may return null.
1534 NavigationEntry* nav_entry = controller->GetVisibleEntry(); 1554 NavigationEntry* nav_entry = controller->GetVisibleEntry();
1535 if (!nav_entry) 1555 if (!nav_entry)
1536 return; 1556 return;
1537 Browser* browser = 1557 Browser* browser = chrome::FindBrowserWithWebContents(
1538 chrome::FindBrowserWithWebContents(source_web_contents_); 1558 GetWebContentsToUse(source_web_contents_));
1539 chrome::ShowWebsiteSettings(browser, source_web_contents_, 1559 chrome::ShowWebsiteSettings(browser,
1560 GetWebContentsToUse(source_web_contents_),
1540 nav_entry->GetURL(), nav_entry->GetSSL()); 1561 nav_entry->GetURL(), nav_entry->GetSSL());
1541 break; 1562 break;
1542 } 1563 }
1543 1564
1544 case IDC_CONTENT_CONTEXT_TRANSLATE: { 1565 case IDC_CONTENT_CONTEXT_TRANSLATE: {
1545 // A translation might have been triggered by the time the menu got 1566 // A translation might have been triggered by the time the menu got
1546 // selected, do nothing in that case. 1567 // selected, do nothing in that case.
1547 ChromeTranslateClient* chrome_translate_client = 1568 ChromeTranslateClient* chrome_translate_client =
1548 ChromeTranslateClient::FromWebContents(source_web_contents_); 1569 ChromeTranslateClient::FromWebContents(source_web_contents_);
1549 if (!chrome_translate_client || 1570 if (!chrome_translate_client ||
(...skipping 218 matching lines...) Expand 10 before | Expand all | Expand 10 after
1768 void RenderViewContextMenu::MediaPlayerActionAt( 1789 void RenderViewContextMenu::MediaPlayerActionAt(
1769 const gfx::Point& location, 1790 const gfx::Point& location,
1770 const WebMediaPlayerAction& action) { 1791 const WebMediaPlayerAction& action) {
1771 source_web_contents_->GetRenderViewHost()-> 1792 source_web_contents_->GetRenderViewHost()->
1772 ExecuteMediaPlayerActionAtLocation(location, action); 1793 ExecuteMediaPlayerActionAtLocation(location, action);
1773 } 1794 }
1774 1795
1775 void RenderViewContextMenu::PluginActionAt( 1796 void RenderViewContextMenu::PluginActionAt(
1776 const gfx::Point& location, 1797 const gfx::Point& location,
1777 const WebPluginAction& action) { 1798 const WebPluginAction& action) {
1778 RenderFrameHost* render_frame_host = GetRenderFrameHost(); 1799 source_web_contents_->GetRenderViewHost()->ExecutePluginActionAtLocation(
1779 if (!render_frame_host) 1800 location, action);
1780 return;
1781 WebContents::FromRenderFrameHost(render_frame_host)->GetRenderViewHost()
1782 ->ExecutePluginActionAtLocation(location, action);
1783 } 1801 }
OLDNEW
« no previous file with comments | « no previous file | components/renderer_context_menu/render_view_context_menu_base.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698