Side by Side Diff: device/battery/battery_monitor.mojom
Issue 592153002:
Replace Chrome IPC with Mojo IPC for querying BatteryStatus service (Closed)
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase.
Created 6 years, 2 months ago
Use n/p to move between diff chunks;
N/P to move between comments.
Draft comments are only viewable by you.
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
3 // found in the LICENSE file.
4
5 import "device/battery/battery_status.mojom"
6
7 module device {
8
9 // A BatteryMonitor will periodically call its client's DidChange method.
10 [Client=BatteryMonitorClient]
11 interface BatteryMonitor {
viettrungluu
2014/10/22 22:05:31
I guess this interface would work, but there's som
I guess this interface would work, but there's something a bit unsatisfying
about it (e.g., the vagueness of the "periodically call ..." above).
Maybe it should be something like:
interface BatteryMonitor {
StartObserving(BatteryMonitorObserver observer);
};
(Maybe StartObserving() would have some parameters to help specify something
about observation frequency; these could be added later.)
(Maybe it shouldn't even be BatteryMonitor, but just "Battery".)
That said, I'm not opposed to this interface as it stands now.
ppi
2014/10/23 15:42:40
As for the observation frequency, I think that in
On 2014/10/22 22:05:31, viettrungluu wrote:
> I guess this interface would work, but there's something a bit unsatisfying
> about it (e.g., the vagueness of the "periodically call ..." above).
>
> Maybe it should be something like:
>
> interface BatteryMonitor {
> StartObserving(BatteryMonitorObserver observer);
> };
>
> (Maybe StartObserving() would have some parameters to help specify something
> about observation frequency; these could be added later.)
>
> (Maybe it shouldn't even be BatteryMonitor, but just "Battery".)
>
> That said, I'm not opposed to this interface as it stands now.
As for the observation frequency, I think that in this CL we aim at keeping the
existing contracts while transitioning from the old IPC mechanism to mojo IPC.
I'd be happy to discuss this separately (I'm sure Tim would be interested too).
I hear your point about vagueness of the interface, yet I'm not sure if
introducing the StartObserving bit would be worth it at this point - before we
have additional parameters to pass there's no functional change or value, right?
Issue 592153002: Replace Chrome IPC with Mojo IPC for querying BatteryStatus service
(Closed)
Created 6 years, 2 months ago by ppi
Modified 6 years, 1 month ago
Reviewers: Ken Rockot(use gerrit already), timvolodine, jam, viettrungluu, jln (very slow on Chromium), Tom Sepez
Base URL: https://chromium.googlesource.com/chromium/src.git@master
Comments: 28