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

Unified Diff: mojo/public/cpp/bindings/associated_group.h

Issue 2702603002: Mojo C++ bindings: remove unnecessary getters/params of AssociatedGroup. (Closed)
Patch Set: . Created 3 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 | « mojo/public/cpp/bindings/associated_binding.h ('k') | mojo/public/cpp/bindings/associated_interface_ptr.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: mojo/public/cpp/bindings/associated_group.h
diff --git a/mojo/public/cpp/bindings/associated_group.h b/mojo/public/cpp/bindings/associated_group.h
index 21d6fcbf2dde4452ce1c90ce8898b42dd0dbca3a..14e78ec3f911c3280721bbab415d16bb6de2c469 100644
--- a/mojo/public/cpp/bindings/associated_group.h
+++ b/mojo/public/cpp/bindings/associated_group.h
@@ -7,8 +7,6 @@
#include "base/callback.h"
#include "base/memory/ref_counted.h"
-#include "mojo/public/cpp/bindings/associated_interface_ptr_info.h"
-#include "mojo/public/cpp/bindings/associated_interface_request.h"
#include "mojo/public/cpp/bindings/bindings_export.h"
#include "mojo/public/cpp/bindings/scoped_interface_endpoint_handle.h"
@@ -43,44 +41,6 @@ class MOJO_CPP_BINDINGS_EXPORT AssociatedGroup {
// remain unchanged ever since.
AssociatedGroupController* GetController();
- // TODO(yzshen): Remove the following public method. It is not needed anymore.
- // Configuration used by CreateAssociatedInterface(). Please see the comments
- // of that method for more details.
- enum AssociatedInterfaceConfig { WILL_PASS_PTR, WILL_PASS_REQUEST };
-
- // |config| indicates whether |ptr_info| or |request| will be sent to the
- // remote side of the message pipe.
- //
- // NOTE: If |config| is |WILL_PASS_REQUEST|, you will want to bind |ptr_info|
- // to a local AssociatedInterfacePtr to make calls. However, there is one
- // restriction: the pointer should NOT be used to make calls before |request|
- // is sent. Violating that will cause the message pipe to be closed. On the
- // other hand, as soon as |request| is sent, the pointer is usable. There is
- // no need to wait until |request| is bound to an implementation at the remote
- // side.
- template <typename T>
- void CreateAssociatedInterface(AssociatedInterfaceConfig config,
- AssociatedInterfacePtrInfo<T>* ptr_info,
- AssociatedInterfaceRequest<T>* request) {
- ScopedInterfaceEndpointHandle handle0;
- ScopedInterfaceEndpointHandle handle1;
- ScopedInterfaceEndpointHandle::CreatePairPendingAssociation(&handle0,
- &handle1);
-
- ptr_info->set_handle(std::move(handle0));
- request->Bind(std::move(handle1));
-
- if (config == WILL_PASS_PTR) {
- // The implementation is local, therefore set the version according to
- // the interface definition that this code is built against.
- ptr_info->set_version(T::Version_);
- } else {
- // The implementation is remote, we don't know about its actual version
- // yet.
- ptr_info->set_version(0u);
- }
- }
-
private:
base::Callback<AssociatedGroupController*()> controller_getter_;
scoped_refptr<AssociatedGroupController> controller_;
« no previous file with comments | « mojo/public/cpp/bindings/associated_binding.h ('k') | mojo/public/cpp/bindings/associated_interface_ptr.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698