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, bu t will act as a catcher for the following |DeleteByDrag| and |InsertFromDrop| co mmands, and combine them into a single undo entry. | |
yosin_UTC9
2016/10/03 09:19:03
Could you reflow a comment to fit in 80 chars / li
chongz
2016/10/04 02:18:39
Done.
| |
13 // In the future when necessary, this mechanism can be generalized into a common command wrapper to achieve undo group. | |
14 class DragAndDropCommand final : public CompositeEditCommand { | |
15 public: | |
16 static DragAndDropCommand* create(Document& document) | |
17 { | |
18 return new DragAndDropCommand(document); | |
19 } | |
20 | |
21 bool isCommandGroupWrapper() const override; | |
22 bool isDragAndDropCommand() const override; | |
23 | |
24 private: | |
25 explicit DragAndDropCommand(Document&); | |
26 | |
27 void doApply(EditingState*) override; | |
28 InputEvent::InputType inputType() const override; | |
29 }; | |
30 | |
31 } // namespace blink | |
32 | |
33 #endif // DragAndDropCommand_h | |
OLD | NEW |