Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(521)

Side by Side Diff: third_party/WebKit/Source/core/editing/commands/DragAndDropCommand.h

Issue 2374743002: [InputEvent] Support |deleteByDrag|, |insertFromDrop| and fire in sequential order (Closed)
Patch Set: Yosin's review 2 Created 4 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698