Skip to content

Commit

Permalink
Merge branch 'main' into unshipped_messages
Browse files Browse the repository at this point in the history
  • Loading branch information
jellefoks authored Nov 17, 2023
2 parents 857f8f4 + 2e8c30c commit 3aa9a67
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 6 deletions.
17 changes: 17 additions & 0 deletions cobalt/h5vcc/h5vcc_settings.cc
Original file line number Diff line number Diff line change
Expand Up @@ -104,5 +104,22 @@ bool H5vccSettings::Set(const std::string& name, SetValueType value) const {
return false;
}

void H5vccSettings::SetPersistentSettingAsInt(const std::string& key,
int value) const {
if (persistent_settings_) {
persistent_settings_->SetPersistentSetting(
key, std::make_unique<base::Value>(value));
}
}

int H5vccSettings::GetPersistentSettingAsInt(const std::string& key,
int default_setting) const {
if (persistent_settings_) {
return persistent_settings_->GetPersistentSettingAsInt(key,
default_setting);
}
return default_setting;
}

} // namespace h5vcc
} // namespace cobalt
5 changes: 5 additions & 0 deletions cobalt/h5vcc/h5vcc_settings.h
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,11 @@ class H5vccSettings : public script::Wrappable {
// invalid or not set to the expected value.
bool Set(const std::string& name, SetValueType value) const;

void SetPersistentSettingAsInt(const std::string& key, int value) const;

int GetPersistentSettingAsInt(const std::string& key,
int default_setting) const;

DEFINE_WRAPPABLE_TYPE(H5vccSettings);

private:
Expand Down
2 changes: 2 additions & 0 deletions cobalt/h5vcc/h5vcc_settings.idl
Original file line number Diff line number Diff line change
Expand Up @@ -14,4 +14,6 @@

interface H5vccSettings {
boolean set(DOMString name, (long or DOMString) value);
void setPersistentSettingAsInt(DOMString name, long value);
long getPersistentSettingAsInt(DOMString name, long default_setting);
};
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,5 @@ if (current_toolchain == default_toolchain &&

cobalt_v8_emit_builtins_as_inline_asm = true

sb_enable_cpp17_audit = false

v8_enable_webassembly = false
}
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,4 @@ if (current_toolchain == default_toolchain &&
sabi_path = "//starboard/sabi/x64/sysv/sabi-v$sb_api_version.json"
gl_type = "angle"
sb_angle_enable_gl = true

sb_enable_cpp17_audit = false
}
2 changes: 0 additions & 2 deletions starboard/win/shared/platform_configuration/configuration.gni
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,3 @@ pedantic_warnings_config_path =
"//starboard/win/shared/platform_configuration:pedantic_warnings"

cobalt_platform_dependencies = [ "//starboard/egl_and_gles" ]

sb_enable_cpp17_audit = false

0 comments on commit 3aa9a67

Please sign in to comment.