OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2005, 2006, 2008 Apple Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
71 private: | 71 private: |
72 Member<Document> m_document; | 72 Member<Document> m_document; |
73 Member<CompositeEditCommand> m_parent; | 73 Member<CompositeEditCommand> m_parent; |
74 }; | 74 }; |
75 | 75 |
76 enum ShouldAssumeContentIsAlwaysEditable { | 76 enum ShouldAssumeContentIsAlwaysEditable { |
77 AssumeContentIsAlwaysEditable, | 77 AssumeContentIsAlwaysEditable, |
78 DoNotAssumeContentIsAlwaysEditable, | 78 DoNotAssumeContentIsAlwaysEditable, |
79 }; | 79 }; |
80 | 80 |
81 class SimpleEditCommand : public EditCommand { | 81 class CORE_EXPORT SimpleEditCommand : public EditCommand { |
82 public: | 82 public: |
83 virtual void doUnapply() = 0; | 83 virtual void doUnapply() = 0; |
84 virtual void doReapply(); // calls doApply() | 84 virtual void doReapply(); // calls doApply() |
85 | 85 |
86 protected: | 86 protected: |
87 explicit SimpleEditCommand(Document& document) : EditCommand(document) {} | 87 explicit SimpleEditCommand(Document& document) : EditCommand(document) {} |
88 | 88 |
89 private: | 89 private: |
90 bool isSimpleEditCommand() const final { return true; } | 90 bool isSimpleEditCommand() const final { return true; } |
91 }; | 91 }; |
92 | 92 |
93 DEFINE_TYPE_CASTS(SimpleEditCommand, | 93 DEFINE_TYPE_CASTS(SimpleEditCommand, |
94 EditCommand, | 94 EditCommand, |
95 command, | 95 command, |
96 command->isSimpleEditCommand(), | 96 command->isSimpleEditCommand(), |
97 command.isSimpleEditCommand()); | 97 command.isSimpleEditCommand()); |
98 | 98 |
99 } // namespace blink | 99 } // namespace blink |
100 | 100 |
101 #endif // EditCommand_h | 101 #endif // EditCommand_h |
OLD | NEW |