embedder_traits: Move Wakelock trait to Embedder_traits#44343
Conversation
|
Additionally, before exposing these to the API, a |
Signed-off-by: Rover track <rishan.pgowda@gmail.com>
|
@mrobinson how to know the methods to be implemented in the |
@mrobinson Actually, I'm not sure if these changes make sense here. The wakelock implementation is a bit different, because the acquire/release operations from the trait take place after the embedder has already approved or denied the request. The trait represents a platform/hardware-specific abstraction over the wakelock feature, and I don't know if changing the naming to match the Delegate concept we use in the embedder API makes sense. |
Is the idea that the If it will be exposed though, it seems very similar to the |
|
Fair enough, assuming you're talking about GamepadDelegate. I think that's a useful comparison. |
Heh. Oh yeah. I meant the |
|
Overall this kind of platform specific implementations could be grouped under a "Platform Abstraction Layer" umbrella. What you put here and not, and what makes sense to override by embedders is not always obvious. For WakeLocks I have a hard time thinking that an embedder could need to override the default platform implementation. On the other hand, something like geolocation has valid use cases for custom implementations. If we don't want the |
|
There is already prior art in this area as well: https://webkit.org/wpe/ |
|
so finally the moving of wakelock trait to embedder_trait would be work done for constellation, for the exposing part a new |
Signed-off-by: Rover track <rishan.pgowda@gmail.com>
Moved the Wakelock trait from wakelock to embedder_trait components/shared/embedder/lib.rs
Added Required dependency in
components/shared/embedder/lib.rsimported the Wakelock trait from
components/shared/embedder/lib.rstocomponents/wakelock/lib.rsAdded dependency
embedder_traitcomponents/wakelock/Cargo.tomlTesting: All expected test pass as there is no change in flow of working
Fixes: #44239