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 th at | |
dcheng
2017/06/23 16:10:35
mojo interfaces should still obey the 80 character
matthalp
2017/06/23 16:36:28
Done.
| |
10 // are not currently accessible to the resource_coordinator service. For example | |
11 // (and the reason for this interface), the UKM mojo interface is accessible to | |
12 // the resource_coordinator service code, as its in //components/, but it's boun d | |
13 // within the content_browser service. Therefore, the content_browser service ne eds | |
14 // to bind to it and pass the message pointer (i.e. message pipe) to the | |
15 // resource_coordinator service. As a result, the ServiceCallbacks interface is | |
16 // strategically called within the content_browser service to pass in the | |
17 // initialized UkmRecorderInterfacePtr to the resource_coordinator service. | |
18 interface ServiceCallbacks { | |
19 // Checks to see if the resource_coordinator service is already active. Any ca ll to | |
20 // EnsureUkmRecorderInterface should be enclosed in the callback and called on ly | |
21 // when active == true to avoid creating an excessive number of UkmRecorderInt erface | |
22 // mojo connections as the resource_coordinator service will ignore the UkmRec orderInterface | |
23 // passed into EnsureUkmRecorderInterface if it is already active. | |
24 IsUkmRecorderInterfaceInitialized() => (bool ukm_recorder_already_initialized) ; | |
25 | |
26 SetUkmRecorderInterface(ukm.mojom.UkmRecorderInterface ukm_recorder_interface) ; | |
27 }; | |
OLD | NEW |