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

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

Issue 390183007: MacViews: Move TranslateClient's InfoBar stub for toolkit-views to a static function in c/b/ui (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: just #ifdef+mac Created 6 years, 5 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
« no previous file with comments | « no previous file | no next file » | 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/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 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
235 TranslateAcceptLanguages* ChromeTranslateClient::GetTranslateAcceptLanguages() { 235 TranslateAcceptLanguages* ChromeTranslateClient::GetTranslateAcceptLanguages() {
236 DCHECK(web_contents()); 236 DCHECK(web_contents());
237 return GetTranslateAcceptLanguages(web_contents()->GetBrowserContext()); 237 return GetTranslateAcceptLanguages(web_contents()->GetBrowserContext());
238 } 238 }
239 239
240 int ChromeTranslateClient::GetInfobarIconID() const { 240 int ChromeTranslateClient::GetInfobarIconID() const {
241 return IDR_INFOBAR_TRANSLATE; 241 return IDR_INFOBAR_TRANSLATE;
242 } 242 }
243 243
244 // ChromeTranslateClient::CreateInfoBar() is implemented in platform-specific 244 // ChromeTranslateClient::CreateInfoBar() is implemented in platform-specific
245 // files, except the TOOLKIT_VIEWS implementation, which has been removed. 245 // files, except the TOOLKIT_VIEWS implementation, which has been removed. Note
246 #if defined(TOOLKIT_VIEWS) 246 // for Mac, Cocoa is still providing the infobar in a toolkit-views build.
247 #if defined(TOOLKIT_VIEWS) && !defined(OS_MACOSX)
247 scoped_ptr<infobars::InfoBar> ChromeTranslateClient::CreateInfoBar( 248 scoped_ptr<infobars::InfoBar> ChromeTranslateClient::CreateInfoBar(
248 scoped_ptr<TranslateInfoBarDelegate> delegate) const { 249 scoped_ptr<TranslateInfoBarDelegate> delegate) const {
249 return scoped_ptr<infobars::InfoBar>(); 250 return scoped_ptr<infobars::InfoBar>();
250 } 251 }
251 #endif 252 #endif
252 253
253 bool ChromeTranslateClient::IsTranslatableURL(const GURL& url) { 254 bool ChromeTranslateClient::IsTranslatableURL(const GURL& url) {
254 return TranslateService::IsTranslatableURL(url); 255 return TranslateService::IsTranslatableURL(url);
255 } 256 }
256 257
(...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 if (GetLanguageState().InTranslateNavigation()) 450 if (GetLanguageState().InTranslateNavigation())
450 return; 451 return;
451 } 452 }
452 453
453 TranslateBubbleFactory::Show( 454 TranslateBubbleFactory::Show(
454 browser->window(), web_contents(), step, error_type); 455 browser->window(), web_contents(), step, error_type);
455 #else 456 #else
456 NOTREACHED(); 457 NOTREACHED();
457 #endif 458 #endif
458 } 459 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698