OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 module resource_coordinator.mojom; |
| 6 |
| 7 import "components/ukm/public/interfaces/ukm_interface.mojom"; |
| 8 |
| 9 // This class is intended to provide an interface to register mojo interfaces |
| 10 // that are not currently accessible to the resource_coordinator service. For |
| 11 // example (and the reason for this interface), the UKM mojo interface is |
| 12 // accessible to the resource_coordinator code, as its in //components/, |
| 13 // but it's bound within the content_browser service. Therefore, the |
| 14 // content_browser service needs to bind to it and pass the message pointer |
| 15 // (i.e. message pipe) to the resource_coordinator service. As a result, the |
| 16 // ServiceCallbacks interface is strategically called within content_browser |
| 17 // to pass in the initialized UkmRecorderInterfacePtr to the |
| 18 // resource_coordinator. |
| 19 interface ServiceCallbacks { |
| 20 // Checks to see if the resource_coordinator service is already active. Any |
| 21 // call to EnsureUkmRecorderInterface should enclosed in the passed callback |
| 22 // and called only when active == true to avoid creating an unecessary |
| 23 // UkmRecorderInterface mojo connections as resource_coordinator will ignore |
| 24 // the UkmRecorderInterface passed into EnsureUkmRecorderInterface if it is |
| 25 // already active. |
| 26 IsUkmRecorderInterfaceInitialized() => (bool ukm_recorder_already_initialized)
; |
| 27 |
| 28 SetUkmRecorderInterface(ukm.mojom.UkmRecorderInterface ukm_recorder_interface)
; |
| 29 }; |
OLD | NEW |