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

Unified Diff: Source/core/events/TextEvent.h

Issue 478243002: bindings: Adds virtual ScriptWrappable::wrap method. (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Synced. Created 6 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Source/core/events/SecurityPolicyViolationEvent.h ('k') | Source/core/events/TouchEvent.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/core/events/TextEvent.h
diff --git a/Source/core/events/TextEvent.h b/Source/core/events/TextEvent.h
index 87c1c85da33a054b8762e4aa0a137e47238edc9c..57615c0311e7db86eb87fcb1b6ae947e2af134ba 100644
--- a/Source/core/events/TextEvent.h
+++ b/Source/core/events/TextEvent.h
@@ -32,50 +32,49 @@
namespace blink {
- class DocumentFragment;
+class DocumentFragment;
- class TextEvent FINAL : public UIEvent {
- public:
+class TextEvent FINAL : public UIEvent {
+ DEFINE_WRAPPERTYPEINFO();
+public:
+ static PassRefPtrWillBeRawPtr<TextEvent> create();
+ static PassRefPtrWillBeRawPtr<TextEvent> create(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
+ static PassRefPtrWillBeRawPtr<TextEvent> createForPlainTextPaste(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, bool shouldSmartReplace);
+ static PassRefPtrWillBeRawPtr<TextEvent> createForFragmentPaste(PassRefPtrWillBeRawPtr<AbstractView>, PassRefPtrWillBeRawPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle);
+ static PassRefPtrWillBeRawPtr<TextEvent> createForDrop(PassRefPtrWillBeRawPtr<AbstractView>, const String& data);
- static PassRefPtrWillBeRawPtr<TextEvent> create();
- static PassRefPtrWillBeRawPtr<TextEvent> create(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
- static PassRefPtrWillBeRawPtr<TextEvent> createForPlainTextPaste(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, bool shouldSmartReplace);
- static PassRefPtrWillBeRawPtr<TextEvent> createForFragmentPaste(PassRefPtrWillBeRawPtr<AbstractView>, PassRefPtrWillBeRawPtr<DocumentFragment> data, bool shouldSmartReplace, bool shouldMatchStyle);
- static PassRefPtrWillBeRawPtr<TextEvent> createForDrop(PassRefPtrWillBeRawPtr<AbstractView>, const String& data);
+ virtual ~TextEvent();
- virtual ~TextEvent();
+ void initTextEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>, const String& data);
- void initTextEvent(const AtomicString& type, bool canBubble, bool cancelable, PassRefPtrWillBeRawPtr<AbstractView>, const String& data);
+ String data() const { return m_data; }
- String data() const { return m_data; }
+ virtual const AtomicString& interfaceName() const OVERRIDE;
- virtual const AtomicString& interfaceName() const OVERRIDE;
+ bool isLineBreak() const { return m_inputType == TextEventInputLineBreak; }
+ bool isComposition() const { return m_inputType == TextEventInputComposition; }
+ bool isPaste() const { return m_inputType == TextEventInputPaste; }
+ bool isDrop() const { return m_inputType == TextEventInputDrop; }
- bool isLineBreak() const { return m_inputType == TextEventInputLineBreak; }
- bool isComposition() const { return m_inputType == TextEventInputComposition; }
- bool isPaste() const { return m_inputType == TextEventInputPaste; }
- bool isDrop() const { return m_inputType == TextEventInputDrop; }
+ bool shouldSmartReplace() const { return m_shouldSmartReplace; }
+ bool shouldMatchStyle() const { return m_shouldMatchStyle; }
+ DocumentFragment* pastingFragment() const { return m_pastingFragment.get(); }
- bool shouldSmartReplace() const { return m_shouldSmartReplace; }
- bool shouldMatchStyle() const { return m_shouldMatchStyle; }
- DocumentFragment* pastingFragment() const { return m_pastingFragment.get(); }
+ virtual void trace(Visitor*) OVERRIDE;
- virtual void trace(Visitor*) OVERRIDE;
+private:
+ TextEvent();
- private:
- TextEvent();
+ TextEvent(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
+ TextEvent(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, PassRefPtrWillBeRawPtr<DocumentFragment>, bool shouldSmartReplace, bool shouldMatchStyle);
- TextEvent(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, TextEventInputType = TextEventInputKeyboard);
- TextEvent(PassRefPtrWillBeRawPtr<AbstractView>, const String& data, PassRefPtrWillBeRawPtr<DocumentFragment>,
- bool shouldSmartReplace, bool shouldMatchStyle);
+ TextEventInputType m_inputType;
+ String m_data;
- TextEventInputType m_inputType;
- String m_data;
-
- RefPtrWillBeMember<DocumentFragment> m_pastingFragment;
- bool m_shouldSmartReplace;
- bool m_shouldMatchStyle;
- };
+ RefPtrWillBeMember<DocumentFragment> m_pastingFragment;
+ bool m_shouldSmartReplace;
+ bool m_shouldMatchStyle;
+};
inline bool isTextEvent(const Event& event)
{
« no previous file with comments | « Source/core/events/SecurityPolicyViolationEvent.h ('k') | Source/core/events/TouchEvent.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698