OLD | NEW |
(Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef CONTENT_BROWSER_VR_VR_SERVICE_CONSUMER_H |
| 6 #define CONTENT_BROWSER_VR_VR_SERVICE_CONSUMER_H |
| 7 |
| 8 #include "base/basictypes.h" |
| 9 #include "content/common/content_export.h" |
| 10 |
| 11 namespace content { |
| 12 |
| 13 class VRService; |
| 14 |
| 15 // Provides a consistent mechanism for tracking objects which use the VRService. |
| 16 // In the future may also provide an interface for the service to push messages. |
| 17 class CONTENT_EXPORT VRServiceConsumer { |
| 18 public: |
| 19 VRServiceConsumer(); |
| 20 // Constructor for testing. |
| 21 explicit VRServiceConsumer(VRService* service); |
| 22 |
| 23 virtual ~VRServiceConsumer(); |
| 24 |
| 25 // Returns the VRService singleton. |
| 26 VRService* GetServiceInstance(); |
| 27 |
| 28 private: |
| 29 VRService* service_; |
| 30 bool registered_with_service_; |
| 31 |
| 32 DISALLOW_COPY_AND_ASSIGN(VRServiceConsumer); |
| 33 }; |
| 34 |
| 35 } // namespace content |
| 36 |
| 37 #endif // CONTENT_BROWSER_VR_VR_SERVICE_CONSUMER_H |
OLD | NEW |