blob: 169dc4a79d0277a58cd809f1695511e66f37a884 [file] [log] [blame] [edit]
// Copyright 2015 The Chromium Authors. All rights reserved.
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
#include "services/reaper/reaper_binding.h"
#include "services/reaper/reaper_impl.h"
namespace reaper {
ReaperBinding::ReaperBinding(const GURL& caller_url,
ReaperImpl* impl,
mojo::InterfaceRequest<Reaper> request)
: caller_url_(caller_url), impl_(impl), binding_(this, request.Pass()) {
}
ReaperBinding::~ReaperBinding() = default;
void ReaperBinding::GetApplicationSecret(
const mojo::Callback<void(uint64)>& callback) {
impl_->GetApplicationSecret(caller_url_, callback);
}
void ReaperBinding::CreateReference(uint32 source_node, uint32 target_node) {
impl_->CreateReference(caller_url_, source_node, target_node);
}
void ReaperBinding::DropNode(uint32 node) {
impl_->DropNode(caller_url_, node);
}
void ReaperBinding::StartTransfer(uint32 node,
mojo::InterfaceRequest<Transfer> request) {
impl_->StartTransfer(caller_url_, node, request.Pass());
}
void ReaperBinding::Ping(const mojo::Closure& closure) {
closure.Run();
}
} // namespace reaper