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

Unified Diff: content/renderer/web_ui_setup_impl.cc

Issue 265793015: Mojo: Replace RemotePtr with InterfacePtr and InterfaceImpl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 years, 7 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
Index: content/renderer/web_ui_setup_impl.cc
diff --git a/content/renderer/web_ui_setup_impl.cc b/content/renderer/web_ui_setup_impl.cc
index e4c065f8a807f30243e506ac18b89508d793064b..7cb7cdaa9963395e9d03491167300b027430bd8d 100644
--- a/content/renderer/web_ui_setup_impl.cc
+++ b/content/renderer/web_ui_setup_impl.cc
@@ -11,15 +11,11 @@ namespace content {
// static
void WebUISetupImpl::Bind(mojo::ScopedMessagePipeHandle handle) {
- // This instance will be destroyed when the pipe is closed. See OnError.
- new WebUISetupImpl(handle.Pass());
+ mojo::BindToPipe(new WebUISetupImpl(), handle.Pass());
}
-WebUISetupImpl::WebUISetupImpl(mojo::ScopedMessagePipeHandle handle)
- : client_(ScopedWebUISetupClientHandle::From(handle.Pass()), this) {
-}
-
-WebUISetupImpl::~WebUISetupImpl() {
+void WebUISetupImpl::OnConnectionError() {
+ delete this;
}
void WebUISetupImpl::SetWebUIHandle(
@@ -34,8 +30,4 @@ void WebUISetupImpl::SetWebUIHandle(
web_ui_mojo->SetBrowserHandle(web_ui_handle.Pass());
}
-void WebUISetupImpl::OnError() {
- delete this;
-}
-
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698