chromium/third_party/blink/renderer/build/scripts/templates/internal_settings_generated.h.tmpl

{% from "templates/macros.tmpl" import license, source_files_for_generated_file %}
{{ license() }}

{{source_files_for_generated_file(template_file, input_files)}}

#ifndef {{header_guard}}
#define {{header_guard}}

#include "base/memory/scoped_refptr.h"
#include "third_party/blink/renderer/core/frame/settings.h"
#include "third_party/blink/renderer/core/page/page.h"
#include "third_party/blink/renderer/platform/bindings/script_wrappable.h"
#include "third_party/blink/renderer/platform/heap/garbage_collected.h"
#include "third_party/blink/renderer/platform/heap/member.h"
#include "third_party/blink/renderer/platform/wtf/ref_counted.h"
#include "third_party/blink/renderer/platform/wtf/text/wtf_string.h"

namespace blink {

class InternalSettingsGenerated : public ScriptWrappable,
                                  public InternalSettingsPageSupplementBase {
  DEFINE_WRAPPERTYPEINFO();

 public:
  explicit InternalSettingsGenerated(Page&);
  virtual ~InternalSettingsGenerated();

  {% for setting in settings if setting.type|to_idl_type %}
  void set{{setting.name.to_upper_camel_case()}}({{setting.type|to_passing_type}} {{setting.name}});
  {% endfor %}

  void Trace(Visitor*) const override;

 protected:
  Settings& GetSettings();

  // Resets all settings to be the initial state when this is constructed.
  // This also includes settings without an idl type (thus without an
  // automatically generated setter method in this class), in case the settings
  // are changed by custom methods defined in InternalSettings.
  void ResetToConsistentState();

 private:
  Settings backup_;
};

}  // namespace blink

#endif  // {{header_guard}}