blob: b8ae2bf04a74dfd75b968eb1baa9bf1de4a1384f (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
|
// Copyright 2017 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.
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_EXPORTED_WEB_FORM_ELEMENT_OBSERVER_IMPL_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_EXPORTED_WEB_FORM_ELEMENT_OBSERVER_IMPL_H_
#include "base/macros.h"
#include "base/util/type_safety/pass_key.h"
#include "third_party/blink/public/web/modules/autofill/web_form_element_observer.h"
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/heap/heap_allocator.h"
#include "third_party/blink/renderer/platform/heap/member.h"
#include "third_party/blink/renderer/platform/heap/self_keep_alive.h"
namespace blink {
class HTMLElement;
class CORE_EXPORT WebFormElementObserverImpl final
: public GarbageCollected<WebFormElementObserverImpl>,
public WebFormElementObserver {
public:
WebFormElementObserverImpl(util::PassKey<WebFormElementObserver>,
HTMLElement&,
base::OnceClosure);
~WebFormElementObserverImpl() override;
// WebFormElementObserver implementation.
void Disconnect() override;
virtual void Trace(Visitor*) const;
private:
class ObserverCallback;
Member<ObserverCallback> mutation_callback_;
// WebFormElementObserverImpl must remain alive until Disconnect() is called.
SelfKeepAlive<WebFormElementObserverImpl> self_keep_alive_;
DISALLOW_COPY_AND_ASSIGN(WebFormElementObserverImpl);
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_EXPORTED_WEB_FORM_ELEMENT_OBSERVER_IMPL_H_
|