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

Side by Side Diff: chrome/renderer/translate_helper.cc

Issue 5794003: Deinline even more destructors. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 10 years 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 | « chrome/renderer/translate_helper.h ('k') | media/filters/bitstream_converter.h » ('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 (c) 2010 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2010 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/renderer/translate_helper.h" 5 #include "chrome/renderer/translate_helper.h"
6 6
7 #include "base/compiler_specific.h" 7 #include "base/compiler_specific.h"
8 #include "base/utf_string_conversions.h" 8 #include "base/utf_string_conversions.h"
9 #include "chrome/common/chrome_constants.h" 9 #include "chrome/common/chrome_constants.h"
10 #include "chrome/renderer/render_view.h" 10 #include "chrome/renderer/render_view.h"
(...skipping 211 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 } 222 }
223 return translate_success; 223 return translate_success;
224 } 224 }
225 225
226 std::string TranslateHelper::GetOriginalPageLanguage() { 226 std::string TranslateHelper::GetOriginalPageLanguage() {
227 std::string lang; 227 std::string lang;
228 ExecuteScriptAndGetStringResult("cr.googleTranslate.sourceLang", &lang); 228 ExecuteScriptAndGetStringResult("cr.googleTranslate.sourceLang", &lang);
229 return lang; 229 return lang;
230 } 230 }
231 231
232 bool TranslateHelper::DontDelayTasks() {
233 return false;
234 }
235
232 //////////////////////////////////////////////////////////////////////////////// 236 ////////////////////////////////////////////////////////////////////////////////
233 // TranslateHelper, private: 237 // TranslateHelper, private:
234 // 238 //
235 void TranslateHelper::CheckTranslateStatus() { 239 void TranslateHelper::CheckTranslateStatus() {
236 if (page_id_ != render_view_->page_id()) 240 if (page_id_ != render_view_->page_id())
237 return; // This is not the same page, the translation has been canceled. 241 return; // This is not the same page, the translation has been canceled.
238 242
239 // First check if there was an error. 243 // First check if there was an error.
240 if (HasTranslationFailed()) { 244 if (HasTranslationFailed()) {
241 NotifyBrowserTranslationFailed(TranslateErrors::TRANSLATION_ERROR); 245 NotifyBrowserTranslationFailed(TranslateErrors::TRANSLATION_ERROR);
(...skipping 125 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 WebView* web_view = render_view_->webview(); 371 WebView* web_view = render_view_->webview();
368 if (!web_view) { 372 if (!web_view) {
369 // When the WebView is going away, the render view should have called 373 // When the WebView is going away, the render view should have called
370 // CancelPendingTranslation() which should have stopped any pending work, so 374 // CancelPendingTranslation() which should have stopped any pending work, so
371 // that case should not happen. 375 // that case should not happen.
372 NOTREACHED(); 376 NOTREACHED();
373 return NULL; 377 return NULL;
374 } 378 }
375 return web_view->mainFrame(); 379 return web_view->mainFrame();
376 } 380 }
OLDNEW
« no previous file with comments | « chrome/renderer/translate_helper.h ('k') | media/filters/bitstream_converter.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698