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

Unified Diff: chrome/browser/renderer_context_menu/render_view_context_menu.cc

Issue 941603002: This is followup of 449919 for addressing nit. (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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | components/renderer_context_menu/render_view_context_menu_base.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/renderer_context_menu/render_view_context_menu.cc
diff --git a/chrome/browser/renderer_context_menu/render_view_context_menu.cc b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
index de85cdfdceaf13ed12f36bd6dfd6f7cd32e3d838..af666b7e166ad76b3bfafb93b376d7f3d851c08c 100644
--- a/chrome/browser/renderer_context_menu/render_view_context_menu.cc
+++ b/chrome/browser/renderer_context_menu/render_view_context_menu.cc
@@ -1012,25 +1012,25 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
IncognitoModePrefs::GetAvailability(prefs);
switch (id) {
case IDC_BACK:
- return embedded_web_contents_->GetController().CanGoBack();
+ return embedder_web_contents_->GetController().CanGoBack();
case IDC_FORWARD:
- return embedded_web_contents_->GetController().CanGoForward();
+ return embedder_web_contents_->GetController().CanGoForward();
case IDC_RELOAD: {
CoreTabHelper* core_tab_helper =
- CoreTabHelper::FromWebContents(embedded_web_contents_);
+ CoreTabHelper::FromWebContents(embedder_web_contents_);
if (!core_tab_helper)
return false;
CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate();
return !core_delegate ||
- core_delegate->CanReloadContents(embedded_web_contents_);
+ core_delegate->CanReloadContents(embedder_web_contents_);
}
case IDC_VIEW_SOURCE:
case IDC_CONTENT_CONTEXT_VIEWFRAMESOURCE:
- return embedded_web_contents_->GetController().CanViewSource();
+ return embedder_web_contents_->GetController().CanViewSource();
case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
case IDC_CONTENT_CONTEXT_INSPECTBACKGROUNDPAGE:
@@ -1039,16 +1039,16 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
return IsDevCommandEnabled(id);
case IDC_CONTENT_CONTEXT_VIEWPAGEINFO:
- if (embedded_web_contents_->GetController().GetVisibleEntry() == NULL)
+ if (embedder_web_contents_->GetController().GetVisibleEntry() == NULL)
return false;
// Disabled if no browser is associated (e.g. desktop notifications).
- if (chrome::FindBrowserWithWebContents(embedded_web_contents_) == NULL)
+ if (chrome::FindBrowserWithWebContents(embedder_web_contents_) == NULL)
return false;
return true;
case IDC_CONTENT_CONTEXT_TRANSLATE: {
ChromeTranslateClient* chrome_translate_client =
- ChromeTranslateClient::FromWebContents(embedded_web_contents_);
+ ChromeTranslateClient::FromWebContents(embedder_web_contents_);
if (!chrome_translate_client)
return false;
std::string original_lang =
@@ -1063,13 +1063,13 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
return ((params_.edit_flags & WebContextMenuData::CanTranslate) != 0) &&
!original_lang.empty() && // Did we receive the page language yet?
!chrome_translate_client->GetLanguageState().IsPageTranslated() &&
- !embedded_web_contents_->GetInterstitialPage() &&
+ !embedder_web_contents_->GetInterstitialPage() &&
// There are some application locales which can't be used as a
// target language for translation.
translate::TranslateDownloadManager::IsSupportedLanguage(
target_lang) &&
// Disable on the Instant Extended NTP.
- !chrome::IsInstantNTP(embedded_web_contents_);
+ !chrome::IsInstantNTP(embedder_web_contents_);
}
case IDC_CONTENT_CONTEXT_OPENLINKNEWTAB:
@@ -1164,13 +1164,13 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
case IDC_SAVE_PAGE: {
CoreTabHelper* core_tab_helper =
- CoreTabHelper::FromWebContents(embedded_web_contents_);
+ CoreTabHelper::FromWebContents(embedder_web_contents_);
if (!core_tab_helper)
return false;
CoreTabHelperDelegate* core_delegate = core_tab_helper->delegate();
if (core_delegate &&
- !core_delegate->CanSaveContents(embedded_web_contents_))
+ !core_delegate->CanSaveContents(embedder_web_contents_))
return false;
PrefService* local_state = g_browser_process->local_state();
@@ -1182,7 +1182,7 @@ bool RenderViewContextMenu::IsCommandIdEnabled(int id) const {
// We save the last committed entry (which the user is looking at), as
// opposed to any pending URL that hasn't committed yet.
NavigationEntry* entry =
- embedded_web_contents_->GetController().GetLastCommittedEntry();
+ embedder_web_contents_->GetController().GetLastCommittedEntry();
return content::IsSavableURL(entry ? entry->GetURL() : GURL());
}
@@ -1468,19 +1468,19 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
break;
case IDC_BACK:
- embedded_web_contents_->GetController().GoBack();
+ embedder_web_contents_->GetController().GoBack();
break;
case IDC_FORWARD:
- embedded_web_contents_->GetController().GoForward();
+ embedder_web_contents_->GetController().GoForward();
break;
case IDC_SAVE_PAGE:
- embedded_web_contents_->OnSavePage();
+ embedder_web_contents_->OnSavePage();
break;
case IDC_RELOAD:
- embedded_web_contents_->GetController().Reload(true);
+ embedder_web_contents_->GetController().Reload(true);
break;
case IDC_CONTENT_CONTEXT_RELOAD_PACKAGED_APP: {
@@ -1523,7 +1523,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
}
case IDC_VIEW_SOURCE:
- embedded_web_contents_->ViewSource();
+ embedder_web_contents_->ViewSource();
break;
case IDC_CONTENT_CONTEXT_INSPECTELEMENT:
@@ -1542,15 +1542,15 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
case IDC_CONTENT_CONTEXT_VIEWPAGEINFO: {
NavigationController* controller =
- &embedded_web_contents_->GetController();
+ &embedder_web_contents_->GetController();
// Important to use GetVisibleEntry to match what's showing in the
// omnibox. This may return null.
NavigationEntry* nav_entry = controller->GetVisibleEntry();
if (!nav_entry)
return;
Browser* browser =
- chrome::FindBrowserWithWebContents(embedded_web_contents_);
- chrome::ShowWebsiteSettings(browser, embedded_web_contents_,
+ chrome::FindBrowserWithWebContents(embedder_web_contents_);
+ chrome::ShowWebsiteSettings(browser, embedder_web_contents_,
nav_entry->GetURL(), nav_entry->GetSSL());
break;
}
@@ -1559,7 +1559,7 @@ void RenderViewContextMenu::ExecuteCommand(int id, int event_flags) {
// A translation might have been triggered by the time the menu got
// selected, do nothing in that case.
ChromeTranslateClient* chrome_translate_client =
- ChromeTranslateClient::FromWebContents(embedded_web_contents_);
+ ChromeTranslateClient::FromWebContents(embedder_web_contents_);
if (!chrome_translate_client ||
chrome_translate_client->GetLanguageState().IsPageTranslated() ||
chrome_translate_client->GetLanguageState().translation_pending()) {
« no previous file with comments | « no previous file | components/renderer_context_menu/render_view_context_menu_base.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698