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

Unified Diff: chrome/browser/translate/options_menu_model.cc

Issue 230453004: Remove InfoBarDelegate::web_contents() (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix compile Created 6 years, 8 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 | « chrome/browser/three_d_api_observer.cc ('k') | chrome/browser/translate/translate_infobar_delegate.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/translate/options_menu_model.cc
diff --git a/chrome/browser/translate/options_menu_model.cc b/chrome/browser/translate/options_menu_model.cc
index ba649a9ada7dd5c6c3a7ffe0cfb87e9e589a09a9..988ab00536d35be5bd9bc3aaac771c98e96a31e0 100644
--- a/chrome/browser/translate/options_menu_model.cc
+++ b/chrome/browser/translate/options_menu_model.cc
@@ -26,7 +26,7 @@ OptionsMenuModel::OptionsMenuModel(
: ui::SimpleMenuModel(this),
translate_infobar_delegate_(translate_delegate) {
// |translate_delegate| must already be owned.
- DCHECK(translate_infobar_delegate_->web_contents());
+ DCHECK(translate_infobar_delegate_->GetWebContents());
base::string16 original_language = translate_delegate->language_name_at(
translate_delegate->original_language_index());
@@ -39,7 +39,7 @@ OptionsMenuModel::OptionsMenuModel(
// Populate the menu.
// Incognito mode does not get any preferences related items.
- if (!translate_delegate->web_contents()->GetBrowserContext()->
+ if (!translate_delegate->GetWebContents()->GetBrowserContext()->
IsOffTheRecord()) {
if (!autodetermined_source_language) {
AddCheckItem(IDC_TRANSLATE_OPTIONS_ALWAYS,
@@ -125,7 +125,7 @@ void OptionsMenuModel::ExecuteCommand(int command_id, int event_flags) {
break;
case IDC_TRANSLATE_OPTIONS_ABOUT: {
- WebContents* web_contents = translate_infobar_delegate_->web_contents();
+ WebContents* web_contents = translate_infobar_delegate_->GetWebContents();
if (web_contents) {
OpenURLParams params(
GURL(chrome::kAboutGoogleTranslateURL), Referrer(),
« no previous file with comments | « chrome/browser/three_d_api_observer.cc ('k') | chrome/browser/translate/translate_infobar_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698