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 { ...@@ -43,6 +43,8 @@ class CORE_EXPORT DeleteSelectionOptions::Builder final {
public: public:
Builder(); Builder();
Builder(const Builder&) = delete;
Builder& operator=(const Builder*) = delete;
DeleteSelectionOptions Build() const; DeleteSelectionOptions Build() const;
...@@ -53,8 +55,6 @@ class CORE_EXPORT DeleteSelectionOptions::Builder final { ...@@ -53,8 +55,6 @@ class CORE_EXPORT DeleteSelectionOptions::Builder final {
private: private:
DeleteSelectionOptions options_; DeleteSelectionOptions options_;
DISALLOW_COPY_AND_ASSIGN(Builder);
}; };
} // namespace blink } // namespace blink
......
...@@ -27,14 +27,14 @@ class CORE_EXPORT EditingState final { ...@@ -27,14 +27,14 @@ class CORE_EXPORT EditingState final {
public: public:
EditingState(); EditingState();
EditingState(const EditingState&) = delete;
EditingState& operator=(const EditingState&) = delete;
void Abort(); void Abort();
bool IsAborted() const { return is_aborted_; } bool IsAborted() const { return is_aborted_; }
private: private:
bool is_aborted_ = false; bool is_aborted_ = false;
DISALLOW_COPY_AND_ASSIGN(EditingState);
}; };
// TODO(yosin): Once all commands aware |EditingState|, we get rid of // TODO(yosin): Once all commands aware |EditingState|, we get rid of
...@@ -44,14 +44,15 @@ class IgnorableEditingAbortState final { ...@@ -44,14 +44,15 @@ class IgnorableEditingAbortState final {
public: public:
IgnorableEditingAbortState(); IgnorableEditingAbortState();
IgnorableEditingAbortState(const IgnorableEditingAbortState&) = delete;
IgnorableEditingAbortState& operator=(const IgnorableEditingAbortState&) =
delete;
~IgnorableEditingAbortState(); ~IgnorableEditingAbortState();
EditingState* GetEditingState() { return &editing_state_; } EditingState* GetEditingState() { return &editing_state_; }
private: private:
EditingState editing_state_; EditingState editing_state_;
DISALLOW_COPY_AND_ASSIGN(IgnorableEditingAbortState);
}; };
// Abort the editing command if the specified expression is true. // Abort the editing command if the specified expression is true.
...@@ -70,6 +71,8 @@ class NoEditingAbortChecker final { ...@@ -70,6 +71,8 @@ class NoEditingAbortChecker final {
public: public:
NoEditingAbortChecker(const char* file, int line); NoEditingAbortChecker(const char* file, int line);
NoEditingAbortChecker(const NoEditingAbortChecker&) = delete;
NoEditingAbortChecker& operator=(const NoEditingAbortChecker&) = delete;
~NoEditingAbortChecker(); ~NoEditingAbortChecker();
EditingState* GetEditingState() { return &editing_state_; } EditingState* GetEditingState() { return &editing_state_; }
...@@ -78,8 +81,6 @@ class NoEditingAbortChecker final { ...@@ -78,8 +81,6 @@ class NoEditingAbortChecker final {
EditingState editing_state_; EditingState editing_state_;
const char* const file_; const char* const file_;
int const line_; int const line_;
DISALLOW_COPY_AND_ASSIGN(NoEditingAbortChecker);
}; };
// If a function with EditingState* argument should not be aborted, // If a function with EditingState* argument should not be aborted,
......
...@@ -81,6 +81,8 @@ class ReplacementFragment final { ...@@ -81,6 +81,8 @@ class ReplacementFragment final {
public: public:
ReplacementFragment(Document*, DocumentFragment*, const VisibleSelection&); ReplacementFragment(Document*, DocumentFragment*, const VisibleSelection&);
ReplacementFragment(const ReplacementFragment&) = delete;
ReplacementFragment& operator=(const ReplacementFragment&) = delete;
Node* FirstChild() const; Node* FirstChild() const;
Node* LastChild() const; Node* LastChild() const;
...@@ -109,8 +111,6 @@ class ReplacementFragment final { ...@@ -109,8 +111,6 @@ class ReplacementFragment final {
DocumentFragment* fragment_; DocumentFragment* fragment_;
bool has_interchange_newline_at_start_; bool has_interchange_newline_at_start_;
bool has_interchange_newline_at_end_; bool has_interchange_newline_at_end_;
DISALLOW_COPY_AND_ASSIGN(ReplacementFragment);
}; };
static bool IsInterchangeHTMLBRElement(const Node* node) { static bool IsInterchangeHTMLBRElement(const Node* node) {
......
...@@ -73,6 +73,8 @@ class SelectionForUndoStep::Builder final { ...@@ -73,6 +73,8 @@ class SelectionForUndoStep::Builder final {
public: public:
Builder(); Builder();
Builder(const Builder&) = delete;
Builder& operator=(const Builder&) = delete;
const SelectionForUndoStep& Build() const { return selection_; } const SelectionForUndoStep& Build() const { return selection_; }
...@@ -88,8 +90,6 @@ class SelectionForUndoStep::Builder final { ...@@ -88,8 +90,6 @@ class SelectionForUndoStep::Builder final {
private: private:
SelectionForUndoStep selection_; SelectionForUndoStep selection_;
DISALLOW_COPY_AND_ASSIGN(Builder);
}; };
VisibleSelection CreateVisibleSelection(const SelectionForUndoStep&); 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