Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright (C) 2006, 2007, 2008 Apple Inc. All rights reserved. | 2 * Copyright (C) 2006, 2007, 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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 139 | 139 |
| 140 // Returns 0 if this Command is not supported. | 140 // Returns 0 if this Command is not supported. |
| 141 int idForHistogram() const; | 141 int idForHistogram() const; |
| 142 private: | 142 private: |
| 143 LocalFrame& frame() const | 143 LocalFrame& frame() const |
| 144 { | 144 { |
| 145 DCHECK(m_frame); | 145 DCHECK(m_frame); |
| 146 return *m_frame; | 146 return *m_frame; |
| 147 } | 147 } |
| 148 | 148 |
| 149 // Returns target ranges for the command, currently only supports delete related commands. | |
| 150 // Used by InputEvent. | |
| 151 RangeVector* getRanges() const; | |
|
yosin_UTC9
2016/05/19 05:01:02
Let's use std::unique_ptr<RangeVector>
chongz
2016/05/25 05:38:57
Done.
| |
| 152 | |
| 149 const EditorInternalCommand* m_command; | 153 const EditorInternalCommand* m_command; |
| 150 EditorCommandSource m_source; | 154 EditorCommandSource m_source; |
| 151 Member<LocalFrame> m_frame; | 155 Member<LocalFrame> m_frame; |
| 152 }; | 156 }; |
| 153 Command createCommand(const String& commandName); // Command source is Comma ndFromMenuOrKeyBinding. | 157 Command createCommand(const String& commandName); // Command source is Comma ndFromMenuOrKeyBinding. |
| 154 Command createCommand(const String& commandName, EditorCommandSource); | 158 Command createCommand(const String& commandName, EditorCommandSource); |
| 155 | 159 |
| 156 // |Editor::executeCommand| is implementation of |WebFrame::executeCommand| | 160 // |Editor::executeCommand| is implementation of |WebFrame::executeCommand| |
| 157 // rather than |Document::execCommand|. | 161 // rather than |Document::execCommand|. |
| 158 bool executeCommand(const String&); | 162 bool executeCommand(const String&); |
| (...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 309 | 313 |
| 310 inline bool Editor::markedTextMatchesAreHighlighted() const | 314 inline bool Editor::markedTextMatchesAreHighlighted() const |
| 311 { | 315 { |
| 312 return m_areMarkedTextMatchesHighlighted; | 316 return m_areMarkedTextMatchesHighlighted; |
| 313 } | 317 } |
| 314 | 318 |
| 315 | 319 |
| 316 } // namespace blink | 320 } // namespace blink |
| 317 | 321 |
| 318 #endif // Editor_h | 322 #endif // Editor_h |
| OLD | NEW |