Upstream version 9.38.198.0
[platform/framework/web/crosswalk.git] / src / third_party / WebKit / Source / core / editing / Editor.h
index eebeb4a..4008c05 100644 (file)
@@ -26,7 +26,7 @@
 #ifndef Editor_h
 #define Editor_h
 
-#include "core/clipboard/ClipboardAccessPolicy.h"
+#include "core/clipboard/DataTransferAccessPolicy.h"
 #include "core/dom/DocumentMarker.h"
 #include "core/editing/EditAction.h"
 #include "core/editing/EditingBehavior.h"
 #include "platform/PasteMode.h"
 #include "platform/heap/Handle.h"
 
-namespace WebCore {
+namespace blink {
 
-class Clipboard;
 class CompositeEditCommand;
+class DataTransfer;
 class EditCommand;
 class EditCommandComposition;
 class EditorClient;
@@ -100,8 +100,6 @@ public:
     static void countEvent(ExecutionContext*, const Event*);
     void copyImage(const HitTestResult&);
 
-    void indent();
-    void outdent();
     void transpose();
 
     bool shouldDeleteRange(Range*) const;
@@ -112,9 +110,6 @@ public:
     TriState selectionHasStyle(CSSPropertyID, const String& value) const;
     String selectionStartCSSPropertyValue(CSSPropertyID);
 
-    TriState selectionUnorderedListState() const;
-    TriState selectionOrderedListState() const;
-
     void removeFormattingAndStyle();
 
     void clearLastEditCommand();
@@ -160,7 +155,12 @@ public:
     Command command(const String& commandName); // Command source is CommandFromMenuOrKeyBinding.
     Command command(const String& commandName, EditorCommandSource);
 
-    bool insertText(const String&, Event* triggeringEvent);
+    // |Editor::executeCommand| is implementation of |WebFrame::executeCommand|
+    // rather than |Document::execCommand|.
+    bool executeCommand(const String&);
+    bool executeCommand(const String& commandName, const String& value);
+
+    bool insertText(const String&, KeyboardEvent* triggeringEvent);
     bool insertTextWithoutSendingTextEvent(const String&, bool selectInsertedText, TextEvent* triggeringEvent);
     bool insertLineBreak();
     bool insertParagraphSeparator();
@@ -199,7 +199,7 @@ public:
     void pasteAsFragment(PassRefPtrWillBeRawPtr<DocumentFragment>, bool smartReplace, bool matchStyle);
     void pasteAsPlainText(const String&, bool smartReplace);
 
-    Node* findEventTargetFrom(const VisibleSelection&) const;
+    Element* findEventTargetFrom(const VisibleSelection&) const;
 
     bool findString(const String&, FindOptions);
     // FIXME: Switch callers over to the FindOptions version and retire this one.
@@ -263,19 +263,19 @@ private:
     void pasteAsPlainTextWithPasteboard(Pasteboard*);
     void pasteWithPasteboard(Pasteboard*);
     void writeSelectionToPasteboard(Pasteboard*, Range*, const String& plainText);
-    bool dispatchCPPEvent(const AtomicString&, ClipboardAccessPolicy, PasteMode = AllMimeTypes);
+    bool dispatchCPPEvent(const AtomicString&, DataTransferAccessPolicy, PasteMode = AllMimeTypes);
 
     void revealSelectionAfterEditingOperation(const ScrollAlignment& = ScrollAlignment::alignCenterIfNeeded, RevealExtentOption = DoNotRevealExtent);
     void changeSelectionAfterCommand(const VisibleSelection& newSelection, FrameSelection::SetSelectionOptions);
     void notifyComponentsOnChangedSelection(const VisibleSelection& oldSelection, FrameSelection::SetSelectionOptions);
 
-    Node* findEventTargetFromSelection() const;
+    Element* findEventTargetFromSelection() const;
 
     PassRefPtrWillBeRawPtr<Range> rangeOfString(const String&, Range*, FindOptions);
 
     SpellChecker& spellChecker() const;
 
-    bool handleEditingKeyboardEvent(WebCore::KeyboardEvent*);
+    bool handleEditingKeyboardEvent(blink::KeyboardEvent*);
 };
 
 inline void Editor::setStartNewKillRingSequence(bool flag)
@@ -299,6 +299,6 @@ inline bool Editor::markedTextMatchesAreHighlighted() const
 }
 
 
-} // namespace WebCore
+} // namespace blink
 
 #endif // Editor_h