From 3e7108bf6295e8da4de22a17ea2d7eea1da95c7b Mon Sep 17 00:00:00 2001 From: Colin Liang Date: Tue, 28 Jan 2025 12:45:47 -0800 Subject: [PATCH] Fix comment, offline discussion: keep the interface name H5vccSystem --- .../blink/renderer/bindings/generated_in_modules.gni | 4 ++-- .../blink/renderer/bindings/idl_in_modules.gni | 2 +- third_party/blink/renderer/modules/BUILD.gn | 2 +- third_party/blink/renderer/modules/cobalt/BUILD.gn | 2 +- .../cobalt/{cobalt_system => h5vcc_system}/BUILD.gn | 7 ++++--- .../h_5_vcc_system.cc} | 11 ++++++----- .../cobalt_system.h => h5vcc_system/h_5_vcc_system.h} | 10 +++++----- .../h_5_vcc_system.idl} | 2 +- third_party/blink/renderer/modules/cobalt/h_5_vcc.cc | 6 +++--- third_party/blink/renderer/modules/cobalt/h_5_vcc.h | 6 +++--- third_party/blink/renderer/modules/cobalt/h_5_vcc.idl | 2 +- 11 files changed, 28 insertions(+), 26 deletions(-) rename third_party/blink/renderer/modules/cobalt/{cobalt_system => h5vcc_system}/BUILD.gn (88%) rename third_party/blink/renderer/modules/cobalt/{cobalt_system/cobalt_system.cc => h5vcc_system/h_5_vcc_system.cc} (72%) rename third_party/blink/renderer/modules/cobalt/{cobalt_system/cobalt_system.h => h5vcc_system/h_5_vcc_system.h} (78%) rename third_party/blink/renderer/modules/cobalt/{cobalt_system/cobalt_system.idl => h5vcc_system/h_5_vcc_system.idl} (97%) diff --git a/third_party/blink/renderer/bindings/generated_in_modules.gni b/third_party/blink/renderer/bindings/generated_in_modules.gni index 7c4a4b90cba..2104bfb492e 100644 --- a/third_party/blink/renderer/bindings/generated_in_modules.gni +++ b/third_party/blink/renderer/bindings/generated_in_modules.gni @@ -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", ] } diff --git a/third_party/blink/renderer/bindings/idl_in_modules.gni b/third_party/blink/renderer/bindings/idl_in_modules.gni index 646e011cb4a..32d5c937c96 100644 --- a/third_party/blink/renderer/bindings/idl_in_modules.gni +++ b/third_party/blink/renderer/bindings/idl_in_modules.gni @@ -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") } diff --git a/third_party/blink/renderer/modules/BUILD.gn b/third_party/blink/renderer/modules/BUILD.gn index 8ad56309172..d8bd3ee36bb 100644 --- a/third_party/blink/renderer/modules/BUILD.gn +++ b/third_party/blink/renderer/modules/BUILD.gn @@ -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", ] } diff --git a/third_party/blink/renderer/modules/cobalt/BUILD.gn b/third_party/blink/renderer/modules/cobalt/BUILD.gn index f71b2c6a1cc..2972145f424 100644 --- a/third_party/blink/renderer/modules/cobalt/BUILD.gn +++ b/third_party/blink/renderer/modules/cobalt/BUILD.gn @@ -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", ] } diff --git a/third_party/blink/renderer/modules/cobalt/cobalt_system/BUILD.gn b/third_party/blink/renderer/modules/cobalt/h5vcc_system/BUILD.gn similarity index 88% rename from third_party/blink/renderer/modules/cobalt/cobalt_system/BUILD.gn rename to third_party/blink/renderer/modules/cobalt/h5vcc_system/BUILD.gn index 35f5ac982a2..53defb79277 100644 --- a/third_party/blink/renderer/modules/cobalt/cobalt_system/BUILD.gn +++ b/third_party/blink/renderer/modules/cobalt/h5vcc_system/BUILD.gn @@ -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", ] } diff --git a/third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.cc b/third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.cc similarity index 72% rename from third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.cc rename to third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.cc index 04f040d47d1..a114ef0f1a6 100644 --- a/third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.cc +++ b/third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.cc @@ -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); } diff --git a/third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.h b/third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.h similarity index 78% rename from third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.h rename to third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.h index 6b524e2bd95..9870607deab 100644 --- a/third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.h +++ b/third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.h @@ -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" @@ -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; @@ -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_ diff --git a/third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.idl b/third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.idl similarity index 97% rename from third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.idl rename to third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.idl index 43e32d8f840..696095c75c5 100644 --- a/third_party/blink/renderer/modules/cobalt/cobalt_system/cobalt_system.idl +++ b/third_party/blink/renderer/modules/cobalt/h5vcc_system/h_5_vcc_system.idl @@ -18,6 +18,6 @@ Exposed=Window, SecureContext ] -interface CobaltSystem { +interface H5vccSystem { readonly attribute DOMString advertisingId; }; diff --git a/third_party/blink/renderer/modules/cobalt/h_5_vcc.cc b/third_party/blink/renderer/modules/cobalt/h_5_vcc.cc index 1c78ca50fe1..82c5720867b 100644 --- a/third_party/blink/renderer/modules/cobalt/h_5_vcc.cc +++ b/third_party/blink/renderer/modules/cobalt/h_5_vcc.cc @@ -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 { @@ -36,11 +36,11 @@ H5vcc* H5vcc::h5vcc(LocalDOMWindow& window) { H5vcc::H5vcc(LocalDOMWindow& window) : Supplement(window), crash_annotator_(MakeGarbageCollected(window)), - cobalt_system_(MakeGarbageCollected(window)) {} + system_(MakeGarbageCollected(window)) {} void H5vcc::Trace(Visitor* visitor) const { visitor->Trace(crash_annotator_); - visitor->Trace(cobalt_system_); + visitor->Trace(system_); Supplement::Trace(visitor); ScriptWrappable::Trace(visitor); } diff --git a/third_party/blink/renderer/modules/cobalt/h_5_vcc.h b/third_party/blink/renderer/modules/cobalt/h_5_vcc.h index 2b86f23f973..0974da14adb 100644 --- a/third_party/blink/renderer/modules/cobalt/h_5_vcc.h +++ b/third_party/blink/renderer/modules/cobalt/h_5_vcc.h @@ -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 { @@ -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 crash_annotator_; - Member cobalt_system_; + Member system_; }; } // namespace blink diff --git a/third_party/blink/renderer/modules/cobalt/h_5_vcc.idl b/third_party/blink/renderer/modules/cobalt/h_5_vcc.idl index 63c426cc90d..731f76a8c71 100644 --- a/third_party/blink/renderer/modules/cobalt/h_5_vcc.idl +++ b/third_party/blink/renderer/modules/cobalt/h_5_vcc.idl @@ -20,5 +20,5 @@ ] interface H5vcc { readonly attribute CrashAnnotator crashAnnotator; - readonly attribute CobaltSystem cobaltSystem; + readonly attribute H5vccSystem system; };