OLD | NEW |
(Empty) | |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #ifndef DragAndDropCommand_h |
| 6 #define DragAndDropCommand_h |
| 7 |
| 8 #include "core/editing/commands/CompositeEditCommand.h" |
| 9 |
| 10 namespace blink { |
| 11 |
| 12 // |DragAndDropCommand| is a dummy command. It doesn't do anything by itself, |
| 13 // but will act as a catcher for the following |DeleteByDrag| and |
| 14 // |InsertFromDrop| commands, and combine them into a single undo entry. |
| 15 // In the future when necessary, this mechanism can be generalized into a common |
| 16 // command wrapper to achieve undo group. |
| 17 class DragAndDropCommand final : public CompositeEditCommand { |
| 18 public: |
| 19 static DragAndDropCommand* create(Document& document) { |
| 20 return new DragAndDropCommand(document); |
| 21 } |
| 22 |
| 23 bool isCommandGroupWrapper() const override; |
| 24 bool isDragAndDropCommand() const override; |
| 25 |
| 26 private: |
| 27 explicit DragAndDropCommand(Document&); |
| 28 |
| 29 void doApply(EditingState*) override; |
| 30 InputEvent::InputType inputType() const override; |
| 31 }; |
| 32 |
| 33 } // namespace blink |
| 34 |
| 35 #endif // DragAndDropCommand_h |
OLD | NEW |