Commit 763af534 authored by HyunJi Kim's avatar HyunJi Kim Committed by Commit Bot

Replace DISALLOW_COPY_AND_ASSIGN macro in editing/commands

Bug: 1010217
Change-Id: Icaffadcc037835b3c498a01b7a71d2ac77fc8dfc
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2375010
Commit-Queue: Hyunjune Kim <hyunjune.kim@samsung.com>
Reviewed-by: default avatarXiaocheng Hu <xiaochengh@chromium.org>
Reviewed-by: default avatarYoshifumi Inoue <yosin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#801773}
parent 461d94a8
......@@ -43,6 +43,8 @@ class CORE_EXPORT DeleteSelectionOptions::Builder final {
public:
Builder();
Builder(const Builder&) = delete;
Builder& operator=(const Builder*) = delete;
DeleteSelectionOptions Build() const;
......@@ -53,8 +55,6 @@ class CORE_EXPORT DeleteSelectionOptions::Builder final {
private:
DeleteSelectionOptions options_;
DISALLOW_COPY_AND_ASSIGN(Builder);
};
} // namespace blink
......
......@@ -27,14 +27,14 @@ class CORE_EXPORT EditingState final {
public:
EditingState();
EditingState(const EditingState&) = delete;
EditingState& operator=(const EditingState&) = delete;
void Abort();
bool IsAborted() const { return is_aborted_; }
private:
bool is_aborted_ = false;
DISALLOW_COPY_AND_ASSIGN(EditingState);
};
// TODO(yosin): Once all commands aware |EditingState|, we get rid of
......@@ -44,14 +44,15 @@ class IgnorableEditingAbortState final {
public:
IgnorableEditingAbortState();
IgnorableEditingAbortState(const IgnorableEditingAbortState&) = delete;
IgnorableEditingAbortState& operator=(const IgnorableEditingAbortState&) =
delete;
~IgnorableEditingAbortState();
EditingState* GetEditingState() { return &editing_state_; }
private:
EditingState editing_state_;
DISALLOW_COPY_AND_ASSIGN(IgnorableEditingAbortState);
};
// Abort the editing command if the specified expression is true.
......@@ -70,6 +71,8 @@ class NoEditingAbortChecker final {
public:
NoEditingAbortChecker(const char* file, int line);
NoEditingAbortChecker(const NoEditingAbortChecker&) = delete;
NoEditingAbortChecker& operator=(const NoEditingAbortChecker&) = delete;
~NoEditingAbortChecker();
EditingState* GetEditingState() { return &editing_state_; }
......@@ -78,8 +81,6 @@ class NoEditingAbortChecker final {
EditingState editing_state_;
const char* const file_;
int const line_;
DISALLOW_COPY_AND_ASSIGN(NoEditingAbortChecker);
};
// If a function with EditingState* argument should not be aborted,
......
......@@ -81,6 +81,8 @@ class ReplacementFragment final {
public:
ReplacementFragment(Document*, DocumentFragment*, const VisibleSelection&);
ReplacementFragment(const ReplacementFragment&) = delete;
ReplacementFragment& operator=(const ReplacementFragment&) = delete;
Node* FirstChild() const;
Node* LastChild() const;
......@@ -109,8 +111,6 @@ class ReplacementFragment final {
DocumentFragment* fragment_;
bool has_interchange_newline_at_start_;
bool has_interchange_newline_at_end_;
DISALLOW_COPY_AND_ASSIGN(ReplacementFragment);
};
static bool IsInterchangeHTMLBRElement(const Node* node) {
......
......@@ -73,6 +73,8 @@ class SelectionForUndoStep::Builder final {
public:
Builder();
Builder(const Builder&) = delete;
Builder& operator=(const Builder&) = delete;
const SelectionForUndoStep& Build() const { return selection_; }
......@@ -88,8 +90,6 @@ class SelectionForUndoStep::Builder final {
private:
SelectionForUndoStep selection_;
DISALLOW_COPY_AND_ASSIGN(Builder);
};
VisibleSelection CreateVisibleSelection(const SelectionForUndoStep&);
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment