Chromium Code Reviews| Index: components/arc/arc_service.h |
| diff --git a/components/arc/arc_service.h b/components/arc/arc_service.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..177db7e6b29a5f884d25778f8d4ad5488672077e |
| --- /dev/null |
| +++ b/components/arc/arc_service.h |
| @@ -0,0 +1,33 @@ |
| +// 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. |
| + |
| +#ifndef COMPONENTS_ARC_ARC_SERVICE_H_ |
| +#define COMPONENTS_ARC_ARC_SERVICE_H_ |
| + |
| +#include "base/macros.h" |
| + |
| +namespace arc { |
| + |
| +class ArcBridgeService; |
| + |
| +// Abstract class whose lifecycle will be managed by the ArcServiceManager. It |
| +// is guaranteed that once the ownership of an ArcService has been transferred |
| +// to ArcServiceManager, it will outlive the ArcBridgeService, so it is safe to |
| +// keep a weak reference to it. |
| +class ArcService { |
| + public: |
| + explicit ArcService(ArcBridgeService* arc_bridge_service); |
| + virtual ~ArcService(); |
|
hidehiko
2016/01/21 08:08:28
nit: let's move this to protected to disallow dire
Luis Héctor Chávez
2016/01/21 22:42:14
Only protecting the constructor since scoped_ptr u
|
| + |
| + ArcBridgeService* arc_bridge_service() const { return arc_bridge_service_; } |
| + |
| + private: |
| + ArcBridgeService* const arc_bridge_service_; // owned by ArcServiceManager. |
| + |
| + DISALLOW_COPY_AND_ASSIGN(ArcService); |
| +}; |
| + |
| +} // namespace arc |
| + |
| +#endif // COMPONENTS_ARC_ARC_SERVICE_H_ |