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

Side by Side Diff: chrome/browser/translate/chrome_translate_client.cc

Issue 325483003: Remove unused Views Translate InfoBar code. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 6 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 | Annotate | Revision Log
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/translate/chrome_translate_client.h" 5 #include "chrome/browser/translate/chrome_translate_client.h"
6 6
7 #include <vector> 7 #include <vector>
8 8
9 #include "base/logging.h" 9 #include "base/logging.h"
10 #include "base/prefs/pref_service.h" 10 #include "base/prefs/pref_service.h"
(...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after
211 TranslateAcceptLanguages* ChromeTranslateClient::GetTranslateAcceptLanguages() { 211 TranslateAcceptLanguages* ChromeTranslateClient::GetTranslateAcceptLanguages() {
212 DCHECK(web_contents()); 212 DCHECK(web_contents());
213 return GetTranslateAcceptLanguages(web_contents()->GetBrowserContext()); 213 return GetTranslateAcceptLanguages(web_contents()->GetBrowserContext());
214 } 214 }
215 215
216 int ChromeTranslateClient::GetInfobarIconID() const { 216 int ChromeTranslateClient::GetInfobarIconID() const {
217 return IDR_INFOBAR_TRANSLATE; 217 return IDR_INFOBAR_TRANSLATE;
218 } 218 }
219 219
220 // ChromeTranslateClient::CreateInfoBar() is implemented in platform-specific 220 // ChromeTranslateClient::CreateInfoBar() is implemented in platform-specific
221 // files. 221 // files, except the TOOLKIT_VIEWS implementation, which has been removed.
222 #if defined(TOOLKIT_VIEWS)
223 scoped_ptr<infobars::InfoBar> ChromeTranslateClient::CreateInfoBar(
224 scoped_ptr<TranslateInfoBarDelegate> delegate) const {
225 return scoped_ptr<infobars::InfoBar>();
226 }
227 #endif
222 228
223 bool ChromeTranslateClient::IsTranslatableURL(const GURL& url) { 229 bool ChromeTranslateClient::IsTranslatableURL(const GURL& url) {
224 return TranslateService::IsTranslatableURL(url); 230 return TranslateService::IsTranslatableURL(url);
225 } 231 }
226 232
227 void ChromeTranslateClient::ShowReportLanguageDetectionErrorUI( 233 void ChromeTranslateClient::ShowReportLanguageDetectionErrorUI(
228 const GURL& report_url) { 234 const GURL& report_url) {
229 #if defined(OS_ANDROID) 235 #if defined(OS_ANDROID)
230 // Android does not support reporting language detection errors. 236 // Android does not support reporting language detection errors.
231 NOTREACHED(); 237 NOTREACHED();
(...skipping 313 matching lines...) Expand 10 before | Expand all | Expand 10 after
545 if (GetLanguageState().InTranslateNavigation()) 551 if (GetLanguageState().InTranslateNavigation())
546 return; 552 return;
547 } 553 }
548 554
549 TranslateBubbleFactory::Show( 555 TranslateBubbleFactory::Show(
550 browser->window(), web_contents(), step, error_type); 556 browser->window(), web_contents(), step, error_type);
551 #else 557 #else
552 NOTREACHED(); 558 NOTREACHED();
553 #endif 559 #endif
554 } 560 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698