| // Copyright 2018 The Chromium Authors. All rights reserved. |
| // Use of this source code is governed by a BSD-style license that can be |
| // found in the LICENSE file. |
| |
| #include "third_party/blink/renderer/core/html/custom/custom_element_disabled_state_changed_callback_reaction.h" |
| |
| #include "third_party/blink/renderer/core/dom/document.h" |
| #include "third_party/blink/renderer/core/html/custom/custom_element_definition.h" |
| |
| namespace blink { |
| |
| CustomElementDisabledStateChangedCallbackReaction:: |
| CustomElementDisabledStateChangedCallbackReaction( |
| CustomElementDefinition* definition, |
| bool is_disabled) |
| : CustomElementReaction(definition), is_disabled_(is_disabled) { |
| DCHECK(definition->HasDisabledStateChangedCallback()); |
| } |
| |
| void CustomElementDisabledStateChangedCallbackReaction::Invoke( |
| Element* element) { |
| definition_->RunDisabledStateChangedCallback(element, is_disabled_); |
| } |
| |
| } // namespace blink |