Skip to content

Commit

Permalink
Fix comment, offline discussion: keep the interface name H5vccSystem
Browse files Browse the repository at this point in the history
  • Loading branch information
Colin Liang committed Jan 28, 2025
1 parent 8ad6dcd commit 3e7108b
Show file tree
Hide file tree
Showing 11 changed files with 28 additions and 26 deletions.
4 changes: 2 additions & 2 deletions third_party/blink/renderer/bindings/generated_in_modules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -2797,8 +2797,8 @@ if (is_cobalt) {
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_crash_annotator.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_h_5_vcc.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_h_5_vcc.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_cobalt_system.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_cobalt_system.h",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_h_5_vcc_system.cc",
"$root_gen_dir/third_party/blink/renderer/bindings/modules/v8/v8_h_5_vcc_system.h",
]
}

Expand Down
2 changes: 1 addition & 1 deletion third_party/blink/renderer/bindings/idl_in_modules.gni
Original file line number Diff line number Diff line change
Expand Up @@ -1212,7 +1212,7 @@ if (is_cobalt) {
"//third_party/blink/renderer/modules/cobalt/crash_annotator/crash_annotator.idl",
"//third_party/blink/renderer/modules/cobalt/h_5_vcc.idl",
"//third_party/blink/renderer/modules/cobalt/window_h_5_vcc.idl",
"//third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.idl",
"//third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.idl",
],
"abspath")
}
Expand Down
2 changes: 1 addition & 1 deletion third_party/blink/renderer/modules/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ component("modules") {
sub_modules += [
"//third_party/blink/renderer/modules/cobalt:h_5_vcc",
"//third_party/blink/renderer/modules/cobalt/crash_annotator",
"//third_party/blink/renderer/modules/cobalt/cobalt_system",
"//third_party/blink/renderer/modules/cobalt/h5vcc_system",
]
}

Expand Down
2 changes: 1 addition & 1 deletion third_party/blink/renderer/modules/cobalt/BUILD.gn
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ blink_modules_sources("h_5_vcc") {
"h_5_vcc.h",
]
deps = [
"//third_party/blink/renderer/modules/cobalt/cobalt_system",
"//third_party/blink/renderer/modules/cobalt/crash_annotator",
"//third_party/blink/renderer/modules/cobalt/h5vcc_system",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -13,9 +13,10 @@
# limitations under the License.

import("//third_party/blink/renderer/modules/modules.gni")
blink_modules_sources("cobalt_system") {

blink_modules_sources("h5vcc_system") {
sources = [
"cobalt_system.cc",
"cobalt_system.h",
"h_5_vcc_system.cc",
"h_5_vcc_system.h",
]
}
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,24 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#include "third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.h"
#include "third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.h"

#include "third_party/blink/renderer/core/frame/local_dom_window.h"

namespace blink {

CobaltSystem::CobaltSystem(LocalDOMWindow& window) {}
H5vccSystem::H5vccSystem(LocalDOMWindow& window) {}

const String CobaltSystem::advertisingId() const {
const String H5vccSystem::advertisingId() const {
NOTIMPLEMENTED();

// TODO add a mojom service and populate the value for advertising_id_.
// TODO(b/377049113) add a mojom service and populate the value for
// advertising_id_.
// return advertising_id_;
return String("fake advertisingId");
}

void CobaltSystem::Trace(Visitor* visitor) const {
void H5vccSystem::Trace(Visitor* visitor) const {
ScriptWrappable::Trace(visitor);
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@
// See the License for the specific language governing permissions and
// limitations under the License.

#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_COBALT_SYSTEM_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_COBALT_SYSTEM_H_
#ifndef THIRD_PARTY_BLINK_RENDERER_MODULES_H_5_VCC_SYSTEM_H_
#define THIRD_PARTY_BLINK_RENDERER_MODULES_H_5_VCC_SYSTEM_H_

#include "third_party/blink/renderer/modules/modules_export.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
Expand All @@ -24,11 +24,11 @@ namespace blink {
class LocalDOMWindow;
class ScriptState;

class MODULES_EXPORT CobaltSystem final : public ScriptWrappable {
class MODULES_EXPORT H5vccSystem final : public ScriptWrappable {
DEFINE_WRAPPERTYPEINFO();

public:
explicit CobaltSystem(LocalDOMWindow&);
explicit H5vccSystem(LocalDOMWindow&);

// Web-exposed interface:
const String advertisingId() const;
Expand All @@ -38,4 +38,4 @@ class MODULES_EXPORT CobaltSystem final : public ScriptWrappable {

} // namespace blink

#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_COBALT_SYSTEM_H_
#endif // THIRD_PARTY_BLINK_RENDERER_MODULES_H_5_VCC_SYSTEM_H_
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,6 @@
Exposed=Window,
SecureContext
]
interface CobaltSystem {
interface H5vccSystem {
readonly attribute DOMString advertisingId;
};
6 changes: 3 additions & 3 deletions third_party/blink/renderer/modules/cobalt/h_5_vcc.cc
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
#include "third_party/blink/renderer/modules/cobalt/h_5_vcc.h"

#include "third_party/blink/renderer/core/frame/local_dom_window.h"
#include "third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.h"
#include "third_party/blink/renderer/modules/cobalt/crash_annotator/crash_annotator.h"
#include "third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.h"

namespace blink {

Expand All @@ -36,11 +36,11 @@ H5vcc* H5vcc::h5vcc(LocalDOMWindow& window) {
H5vcc::H5vcc(LocalDOMWindow& window)
: Supplement<LocalDOMWindow>(window),
crash_annotator_(MakeGarbageCollected<CrashAnnotator>(window)),
cobalt_system_(MakeGarbageCollected<CobaltSystem>(window)) {}
system_(MakeGarbageCollected<H5vccSystem>(window)) {}

void H5vcc::Trace(Visitor* visitor) const {
visitor->Trace(crash_annotator_);
visitor->Trace(cobalt_system_);
visitor->Trace(system_);
Supplement<LocalDOMWindow>::Trace(visitor);
ScriptWrappable::Trace(visitor);
}
Expand Down
6 changes: 3 additions & 3 deletions third_party/blink/renderer/modules/cobalt/h_5_vcc.h
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ namespace blink {
class ScriptState;
class CrashAnnotator;
class LocalDOMWindow;
class CobaltSystem;
class H5vccSystem;

class MODULES_EXPORT H5vcc final : public ScriptWrappable,
public Supplement<LocalDOMWindow> {
Expand All @@ -43,13 +43,13 @@ class MODULES_EXPORT H5vcc final : public ScriptWrappable,

CrashAnnotator* crashAnnotator() { return crash_annotator_; }

CobaltSystem* cobaltSystem() { return cobalt_system_; }
H5vccSystem* system() { return system_; }

void Trace(Visitor*) const override;

private:
Member<CrashAnnotator> crash_annotator_;
Member<CobaltSystem> cobalt_system_;
Member<H5vccSystem> system_;
};

} // namespace blink
Expand Down
2 changes: 1 addition & 1 deletion third_party/blink/renderer/modules/cobalt/h_5_vcc.idl
Original file line number Diff line number Diff line change
Expand Up @@ -20,5 +20,5 @@
]
interface H5vcc {
readonly attribute CrashAnnotator crashAnnotator;
readonly attribute CobaltSystem cobaltSystem;
readonly attribute H5vccSystem system;
};

0 comments on commit 3e7108b

Please sign in to comment.