Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add H5vccSystem web interface, set window.h5vcc.h5vccSystem object #4763

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

zhongqiliang
Copy link
Contributor

The readonly property advertisingId return a dummy value.

b/377049113

The readonly property advertisingId under H5vccSystem return a dummy value.

b/377049113
Copy link
Contributor

@yell0wd0g yell0wd0g left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No major concerns, just a few drive-by comments. Will let @andrewsavage1 or @hlwarriner give the final RS.

namespace blink {

// static
const char H5vccSystem::kSupplementName[] = "H5vccSystem";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

constexpr?


const String H5vccSystem::advertisingId() const {
// TODO populate the value here.
// return advertising_id_;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -0,0 +1,57 @@
// Copyright 2024 The Cobalt Authors. All Rights Reserved.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2024 here and elsewhere.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2025?

Exposed=Window,
SecureContext
]
interface H5vccSystem {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

class ScriptPromiseResolver;
class ScriptState;

class MODULES_EXPORT H5vccSystem final
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we add class comments here? Specially what it does : )

@@ -18,4 +18,5 @@
]
interface H5vcc {
readonly attribute CrashAnnotator crashAnnotator;
readonly attribute H5vccSystem h5vccSystem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reading the name here it makes me think the H5vcc prefix is unnecessary, but if we were to just call this attribute system it would be almost meaningless. Can we think of a better name, or are we limited by backwards compatibility?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should call it system for now and adhere to c25 interfaces, but later evaluate renaming

@@ -0,0 +1,7 @@
import("//third_party/blink/renderer/modules/modules.gni")
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add a copyright header

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This file isn't properly formatted. Could you add a line in https://github.com/youtube/cobalt/blob/main/.pre-commit-config.yaml#L8 to add this directory to formatting rules please?

namespace blink {

// static
const char H5vccSystem::kSupplementName[] = "H5vccSystem";
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This isn't needed—H5vccSystem will not be a Supplementable nor an ExecutionContextLifecycleObserver, it should only inherit from ScriptWrappable

@@ -18,4 +18,5 @@
]
interface H5vcc {
readonly attribute CrashAnnotator crashAnnotator;
readonly attribute H5vccSystem h5vccSystem;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should call it system for now and adhere to c25 interfaces, but later evaluate renaming

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants