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

Side by Side Diff: components/translate/content/renderer/translate_helper.cc

Issue 2589663003: mojo:: Rename mojo::GetProxy() to mojo::MakeRequest() (Closed)
Patch Set: Rebase Created 3 years, 12 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
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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 "components/translate/content/renderer/translate_helper.h" 5 #include "components/translate/content/renderer/translate_helper.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "base/location.h" 9 #include "base/location.h"
10 #include "base/logging.h" 10 #include "base/logging.h"
(...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after
457 TranslateErrors::Type error) { 457 TranslateErrors::Type error) {
458 DCHECK(translate_callback_pending_); 458 DCHECK(translate_callback_pending_);
459 // Notify the browser there was an error. 459 // Notify the browser there was an error.
460 translate_callback_pending_.Run(false, source_lang_, target_lang_, error); 460 translate_callback_pending_.Run(false, source_lang_, target_lang_, error);
461 translate_callback_pending_.Reset(); 461 translate_callback_pending_.Reset();
462 } 462 }
463 463
464 const mojom::ContentTranslateDriverPtr& TranslateHelper::GetTranslateDriver() { 464 const mojom::ContentTranslateDriverPtr& TranslateHelper::GetTranslateDriver() {
465 if (!translate_driver_) { 465 if (!translate_driver_) {
466 render_frame()->GetRemoteInterfaces()->GetInterface( 466 render_frame()->GetRemoteInterfaces()->GetInterface(
467 mojo::GetProxy(&translate_driver_)); 467 mojo::MakeRequest(&translate_driver_));
468 } 468 }
469 469
470 return translate_driver_; 470 return translate_driver_;
471 } 471 }
472 472
473 void TranslateHelper::ResetPage() { 473 void TranslateHelper::ResetPage() {
474 binding_.Close(); 474 binding_.Close();
475 translate_callback_pending_.Reset(); 475 translate_callback_pending_.Reset();
476 CancelPendingTranslation(); 476 CancelPendingTranslation();
477 } 477 }
478 478
479 void TranslateHelper::OnDestruct() { 479 void TranslateHelper::OnDestruct() {
480 delete this; 480 delete this;
481 } 481 }
482 482
483 } // namespace translate 483 } // namespace translate
OLDNEW
« no previous file with comments | « components/test_runner/app_banner_service.cc ('k') | content/browser/android/java_interfaces_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698