OLD | NEW |
1 // Copyright 2017 The Chromium Authors. All rights reserved. | 1 // Copyright 2017 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 FrameResourceCoordinator_h | 5 #ifndef FrameResourceCoordinator_h |
6 #define FrameResourceCoordinator_h | 6 #define FrameResourceCoordinator_h |
7 | 7 |
8 #include "platform/heap/Handle.h" | 8 #include "platform/heap/Handle.h" |
9 #include "services/resource_coordinator/public/interfaces/coordination_unit.mojo
m-blink.h" | 9 #include "services/resource_coordinator/public/interfaces/coordination_unit.mojo
m-blink.h" |
10 | 10 |
11 namespace blink { | 11 namespace blink { |
12 | 12 |
13 class InterfaceProvider; | 13 class InterfaceProvider; |
14 | 14 |
15 class PLATFORM_EXPORT FrameResourceCoordinator final | 15 class PLATFORM_EXPORT FrameResourceCoordinator final |
16 : public GarbageCollectedFinalized<FrameResourceCoordinator> { | 16 : public GarbageCollectedFinalized<FrameResourceCoordinator> { |
17 WTF_MAKE_NONCOPYABLE(FrameResourceCoordinator); | 17 WTF_MAKE_NONCOPYABLE(FrameResourceCoordinator); |
18 | 18 |
19 public: | 19 public: |
20 static bool IsEnabled(); | 20 static bool IsEnabled(); |
21 static FrameResourceCoordinator* Create(InterfaceProvider*); | 21 static FrameResourceCoordinator* Create(InterfaceProvider*); |
22 virtual ~FrameResourceCoordinator(); | 22 virtual ~FrameResourceCoordinator(); |
| 23 void SendEvent(const resource_coordinator::mojom::blink::EventType&); |
23 | 24 |
24 DECLARE_TRACE(); | 25 DECLARE_TRACE(); |
25 | 26 |
26 private: | 27 private: |
27 explicit FrameResourceCoordinator(InterfaceProvider*); | 28 explicit FrameResourceCoordinator(InterfaceProvider*); |
28 | 29 |
29 resource_coordinator::mojom::blink::CoordinationUnitPtr service_; | 30 resource_coordinator::mojom::blink::CoordinationUnitPtr service_; |
30 }; | 31 }; |
31 | 32 |
32 } // namespace blink | 33 } // namespace blink |
33 | 34 |
34 #endif // FrameResourceCoordinator_h | 35 #endif // FrameResourceCoordinator_h |
OLD | NEW |