blob: 556b04ceddd9cd81f738686253ee8899d34cae83 (
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
48
49
50
51
52
53
54
55
56
57
58
59
60
61
|
// 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.
#ifndef THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_COMMANDS_DELETE_SELECTION_OPTIONS_H_
#define THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_COMMANDS_DELETE_SELECTION_OPTIONS_H_
#include "third_party/blink/renderer/core/core_export.h"
#include "third_party/blink/renderer/platform/wtf/allocator/allocator.h"
namespace blink {
// DeleteSelectionOptions of |DeleteSelectionCommand|.
class CORE_EXPORT DeleteSelectionOptions final {
DISALLOW_NEW();
public:
class Builder;
DeleteSelectionOptions(const DeleteSelectionOptions&);
bool IsExpandForSpecialElements() const;
bool IsMergeBlocksAfterDelete() const;
bool IsSanitizeMarkup() const;
bool IsSmartDelete() const;
static DeleteSelectionOptions NormalDelete();
static DeleteSelectionOptions SmartDelete();
private:
DeleteSelectionOptions();
bool is_expand_for_special_elements_ = false;
bool is_merge_blocks_after_delete_ = false;
bool is_sanitize_markup_ = false;
bool is_smart_delete_ = false;
};
// Build |DeleteSelectionCommand::Options|.
class CORE_EXPORT DeleteSelectionOptions::Builder final {
DISALLOW_NEW();
public:
Builder();
Builder(const Builder&) = delete;
Builder& operator=(const Builder*) = delete;
DeleteSelectionOptions Build() const;
Builder& SetExpandForSpecialElements(bool);
Builder& SetMergeBlocksAfterDelete(bool);
Builder& SetSanitizeMarkup(bool);
Builder& SetSmartDelete(bool);
private:
DeleteSelectionOptions options_;
};
} // namespace blink
#endif // THIRD_PARTY_BLINK_RENDERER_CORE_EDITING_COMMANDS_DELETE_SELECTION_OPTIONS_H_
|