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

Unified Diff: components/html_viewer/html_document_application_delegate.cc

Issue 1678923003: Rename ServiceConnector to InterfaceBinder. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@connection
Patch Set: . Created 4 years, 10 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
« no previous file with comments | « components/html_viewer/html_document_application_delegate.h ('k') | mojo/mojo_base.gyp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: components/html_viewer/html_document_application_delegate.cc
diff --git a/components/html_viewer/html_document_application_delegate.cc b/components/html_viewer/html_document_application_delegate.cc
index 7316202828e5e157dde6fac4e11a48c6265f1cb9..9d699dd0c9033cf090a179dc64c3fff13df7737a 100644
--- a/components/html_viewer/html_document_application_delegate.cc
+++ b/components/html_viewer/html_document_application_delegate.cc
@@ -10,18 +10,19 @@
#include "base/macros.h"
#include "components/html_viewer/global_state.h"
#include "components/html_viewer/html_document.h"
+#include "mojo/shell/public/cpp/interface_binder.h"
#include "mojo/shell/public/cpp/shell_client.h"
namespace html_viewer {
-// ServiceConnectorQueue records all incoming service requests and processes
+// InterfaceBinderQueue records all incoming service requests and processes
// them once PushRequestsTo() is called. This is useful if you need to delay
// processing incoming service requests.
-class HTMLDocumentApplicationDelegate::ServiceConnectorQueue
- : public mojo::ServiceConnector {
+class HTMLDocumentApplicationDelegate::InterfaceBinderQueue
+ : public mojo::InterfaceBinder {
public:
- ServiceConnectorQueue() {}
- ~ServiceConnectorQueue() override {}
+ InterfaceBinderQueue() {}
+ ~InterfaceBinderQueue() override {}
void PushRequestsTo(mojo::Connection* connection) {
ScopedVector<Request> requests;
@@ -38,10 +39,10 @@ class HTMLDocumentApplicationDelegate::ServiceConnectorQueue
mojo::ScopedMessagePipeHandle handle;
};
- // mojo::ServiceConnector:
- void ConnectToService(mojo::Connection* connection,
- const std::string& interface_name,
- mojo::ScopedMessagePipeHandle handle) override {
+ // mojo::InterfaceBinder:
+ void BindInterface(mojo::Connection* connection,
+ const std::string& interface_name,
+ mojo::ScopedMessagePipeHandle handle) override {
scoped_ptr<Request> request(new Request);
request->interface_name = interface_name;
request->handle = std::move(handle);
@@ -50,7 +51,7 @@ class HTMLDocumentApplicationDelegate::ServiceConnectorQueue
ScopedVector<Request> requests_;
- DISALLOW_COPY_AND_ASSIGN(ServiceConnectorQueue);
+ DISALLOW_COPY_AND_ASSIGN(InterfaceBinderQueue);
};
HTMLDocumentApplicationDelegate::HTMLDocumentApplicationDelegate(
@@ -119,9 +120,9 @@ bool HTMLDocumentApplicationDelegate::AcceptConnection(
} else {
// HTMLDocument provides services, but is created asynchronously. Queue up
// requests until the HTMLDocument is created.
- scoped_ptr<ServiceConnectorQueue> service_connector_queue(
- new ServiceConnectorQueue);
- connection->SetServiceConnector(service_connector_queue.get());
+ scoped_ptr<InterfaceBinderQueue> interface_binder_queue(
+ new InterfaceBinderQueue);
+ connection->SetDefaultInterfaceBinder(interface_binder_queue.get());
mojo::URLLoaderPtr loader;
url_loader_factory_->CreateURLLoader(GetProxy(&loader));
@@ -141,7 +142,7 @@ bool HTMLDocumentApplicationDelegate::AcceptConnection(
base::Bind(&HTMLDocumentApplicationDelegate::OnResponseReceived,
weak_factory_.GetWeakPtr(), base::Passed(&app_retainer),
base::Passed(&loader), connection,
- base::Passed(&service_connector_queue)));
+ base::Passed(&interface_binder_queue)));
}
return true;
}
@@ -156,7 +157,7 @@ void HTMLDocumentApplicationDelegate::OnResponseReceived(
scoped_ptr<mojo::AppRefCount> app_refcount,
mojo::URLLoaderPtr loader,
mojo::Connection* connection,
- scoped_ptr<ServiceConnectorQueue> connector_queue,
+ scoped_ptr<InterfaceBinderQueue> binder_queue,
mojo::URLResponsePtr response) {
// HTMLDocument is destroyed when the hosting view is destroyed, or
// explicitly from our destructor.
@@ -167,9 +168,9 @@ void HTMLDocumentApplicationDelegate::OnResponseReceived(
html_factory_);
documents2_.insert(document);
- if (connector_queue) {
- connector_queue->PushRequestsTo(connection);
- connection->SetServiceConnector(nullptr);
+ if (binder_queue) {
+ binder_queue->PushRequestsTo(connection);
+ connection->SetDefaultInterfaceBinder(nullptr);
}
}
« no previous file with comments | « components/html_viewer/html_document_application_delegate.h ('k') | mojo/mojo_base.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698