Chromium Code Reviews| Index: components/arc/test/fake_arc_bridge_bootstrap.cc |
| diff --git a/components/arc/test/fake_arc_bridge_bootstrap.cc b/components/arc/test/fake_arc_bridge_bootstrap.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..8ce2a52a7691c2d6bca9e81f2282e4ee7355567a |
| --- /dev/null |
| +++ b/components/arc/test/fake_arc_bridge_bootstrap.cc |
| @@ -0,0 +1,31 @@ |
| +// Copyright 2016 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 "components/arc/test/fake_arc_bridge_bootstrap.h" |
| + |
| +#include <utility> |
| + |
| +#include "base/bind.h" |
|
bartfab (slow)
2016/03/02 14:45:41
Nit: Not used.
Polina Bondarenko
2016/03/06 20:22:33
Done.
|
| +#include "base/bind_helpers.h" |
|
bartfab (slow)
2016/03/02 14:45:41
Nit: Not used.
Polina Bondarenko
2016/03/06 20:22:33
Done.
|
| +#include "components/arc/test/fake_arc_bridge_instance.h" |
| + |
| +namespace arc { |
| + |
| +FakeArcBridgeBootstrap::FakeArcBridgeBootstrap(FakeArcBridgeInstance* instance) |
| + : instance_(instance) {} |
|
bartfab (slow)
2016/03/02 14:45:41
Nit: If a method declaration is not inline, the cl
Polina Bondarenko
2016/03/06 20:22:33
Done.
|
| + |
| +void FakeArcBridgeBootstrap::Start() { |
| + DCHECK(delegate_); |
|
bartfab (slow)
2016/03/02 14:45:41
Nit: #include "base/logging.h"
Polina Bondarenko
2016/03/06 20:22:33
Done.
|
| + ArcBridgeInstancePtr instance; |
|
bartfab (slow)
2016/03/02 14:45:41
Nit: #include "components/arc/common/arc_bridge.mo
Polina Bondarenko
2016/03/06 20:22:33
Done.
|
| + instance_->Bind(mojo::GetProxy(&instance)); |
|
bartfab (slow)
2016/03/02 14:45:41
Nit: #include "mojo/public/cpp/bindings/interface_
Polina Bondarenko
2016/03/06 20:22:33
Done.
|
| + delegate_->OnConnectionEstablished(std::move(instance)); |
| +} |
| + |
| +void FakeArcBridgeBootstrap::Stop() { |
| + DCHECK(delegate_); |
| + instance_->Unbind(); |
| + delegate_->OnStopped(); |
| +} |
| + |
| +} // namespace arc |