OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef MOJO_EDK_EMBEDDER_PLATFORM_SUPPORT_H_ | 5 #ifndef MOJO_EDK_EMBEDDER_PLATFORM_SUPPORT_H_ |
6 #define MOJO_EDK_EMBEDDER_PLATFORM_SUPPORT_H_ | 6 #define MOJO_EDK_EMBEDDER_PLATFORM_SUPPORT_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 | 9 |
10 #include "mojo/edk/embedder/scoped_platform_handle.h" | 10 #include "mojo/edk/embedder/scoped_platform_handle.h" |
11 #include "mojo/edk/system/system_impl_export.h" | |
12 #include "mojo/public/c/system/types.h" | 11 #include "mojo/public/c/system/types.h" |
13 #include "mojo/public/cpp/system/macros.h" | 12 #include "mojo/public/cpp/system/macros.h" |
14 | 13 |
15 namespace mojo { | 14 namespace mojo { |
16 namespace embedder { | 15 namespace embedder { |
17 | 16 |
18 class PlatformSharedBuffer; | 17 class PlatformSharedBuffer; |
19 | 18 |
20 // This class is provided by the embedder to implement (typically | 19 // This class is provided by the embedder to implement (typically |
21 // platform-dependent) things needed by the Mojo system implementation. | 20 // platform-dependent) things needed by the Mojo system implementation. |
22 // Implementations must be thread-safe. | 21 // Implementations must be thread-safe. |
23 class MOJO_SYSTEM_IMPL_EXPORT PlatformSupport { | 22 class PlatformSupport { |
24 public: | 23 public: |
25 virtual ~PlatformSupport() {} | 24 virtual ~PlatformSupport() {} |
26 | 25 |
27 // Gets a "time-ticks" value: | 26 // Gets a "time-ticks" value: |
28 // - The value should be nondecreasing with respect to time/causality. | 27 // - The value should be nondecreasing with respect to time/causality. |
29 // - The value should be in microseconds (i.e., if a caller runs | 28 // - The value should be in microseconds (i.e., if a caller runs |
30 // continuously, getting the value twice, their difference should be | 29 // continuously, getting the value twice, their difference should be |
31 // approximately the real time elapsed between the samples, in | 30 // approximately the real time elapsed between the samples, in |
32 // microseconds). | 31 // microseconds). |
33 // - The value should be nonnegative. | 32 // - The value should be nonnegative. |
(...skipping 18 matching lines...) Expand all Loading... |
52 PlatformSupport() {} | 51 PlatformSupport() {} |
53 | 52 |
54 private: | 53 private: |
55 MOJO_DISALLOW_COPY_AND_ASSIGN(PlatformSupport); | 54 MOJO_DISALLOW_COPY_AND_ASSIGN(PlatformSupport); |
56 }; | 55 }; |
57 | 56 |
58 } // namespace embedder | 57 } // namespace embedder |
59 } // namespace mojo | 58 } // namespace mojo |
60 | 59 |
61 #endif // MOJO_EDK_EMBEDDER_PLATFORM_SUPPORT_H_ | 60 #endif // MOJO_EDK_EMBEDDER_PLATFORM_SUPPORT_H_ |
OLD | NEW |