[components] Merge https://github.com/mozilla-mobile/android-components/pull/7510
7510: Add firefox profiler marker API to the GeckoEngine r=pocmo a=canova
Hi all, I'm on the Firefox Profiler team and I was working on the geckoview API for the Firefox and just landed the GeckoView part in [Bug
1624993](https://bugzilla.mozilla.org/show_bug.cgi?id=
1624993). I also want to add this API to android-components so we can use that API in the consumers like Fenix. This is still not exactly complete but I wanted to get some early feedback from you. It would be great if you can take a look at it.
- I added a `ProfilerRuntime` interface and added that interface to `GeckoEngine`. These ProfilerRuntime methods calls the geckoview APIs. I'm not exactly sure about the place. I added it to GeckoEngine class but I can move it to somewhere else too if you think it's not great.
- Also currently I didn't add any tests and I would like to get your feedback on how to write this as well. This feels like a bit tricky, because when the profiler is not running, these methods are no-op. And currently there is no way to enable profiler from geckoview. It's only possible with[ remote profiling via `about:debugging`](https://profiler.firefox.com/docs/#/./guide-remote-profiling). So I'm not sure what to test here. Maybe if we have some devtools tests in the codebase, I can try to do some things like these.
Co-authored-by: Nazım Can Altınova <canaltinova@gmail.com>