OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009 Apple Inc. All rights reserved. | 2 * Copyright (C) 2009 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 20 matching lines...) Expand all Loading... |
31 #include "core/events/UIEvent.h" | 31 #include "core/events/UIEvent.h" |
32 | 32 |
33 namespace WebCore { | 33 namespace WebCore { |
34 | 34 |
35 struct CompositionEventInit : UIEventInit { | 35 struct CompositionEventInit : UIEventInit { |
36 CompositionEventInit(); | 36 CompositionEventInit(); |
37 | 37 |
38 String data; | 38 String data; |
39 }; | 39 }; |
40 | 40 |
41 class CompositionEvent : public UIEvent { | 41 class CompositionEvent FINAL : public UIEvent { |
42 public: | 42 public: |
43 static PassRefPtr<CompositionEvent> create() | 43 static PassRefPtr<CompositionEvent> create() |
44 { | 44 { |
45 return adoptRef(new CompositionEvent); | 45 return adoptRef(new CompositionEvent); |
46 } | 46 } |
47 | 47 |
48 static PassRefPtr<CompositionEvent> create(const AtomicString& type, PassRef
Ptr<AbstractView> view, const String& data) | 48 static PassRefPtr<CompositionEvent> create(const AtomicString& type, PassRef
Ptr<AbstractView> view, const String& data) |
49 { | 49 { |
50 return adoptRef(new CompositionEvent(type, view, data)); | 50 return adoptRef(new CompositionEvent(type, view, data)); |
51 } | 51 } |
(...skipping 10 matching lines...) Expand all Loading... |
62 | 62 |
63 virtual ~CompositionEvent(); | 63 virtual ~CompositionEvent(); |
64 | 64 |
65 void initCompositionEvent(const AtomicString& type, bool canBubble, bool can
celable, PassRefPtr<AbstractView>, const String& data); | 65 void initCompositionEvent(const AtomicString& type, bool canBubble, bool can
celable, PassRefPtr<AbstractView>, const String& data); |
66 | 66 |
67 String data() const { return m_data; } | 67 String data() const { return m_data; } |
68 int activeSegmentStart() const { return m_activeSegmentStart; } | 68 int activeSegmentStart() const { return m_activeSegmentStart; } |
69 int activeSegmentEnd() const { return m_activeSegmentEnd; } | 69 int activeSegmentEnd() const { return m_activeSegmentEnd; } |
70 const Vector<unsigned>& getSegments() const { return m_segments; } | 70 const Vector<unsigned>& getSegments() const { return m_segments; } |
71 | 71 |
72 virtual const AtomicString& interfaceName() const; | 72 virtual const AtomicString& interfaceName() const OVERRIDE; |
73 | 73 |
74 private: | 74 private: |
75 CompositionEvent(); | 75 CompositionEvent(); |
76 CompositionEvent(const AtomicString& type, PassRefPtr<AbstractView>, const S
tring&); | 76 CompositionEvent(const AtomicString& type, PassRefPtr<AbstractView>, const S
tring&); |
77 CompositionEvent(const AtomicString& type, PassRefPtr<AbstractView>, const S
tring&, const Vector<CompositionUnderline>& underlines); | 77 CompositionEvent(const AtomicString& type, PassRefPtr<AbstractView>, const S
tring&, const Vector<CompositionUnderline>& underlines); |
78 CompositionEvent(const AtomicString& type, const CompositionEventInit&); | 78 CompositionEvent(const AtomicString& type, const CompositionEventInit&); |
79 void initializeSegments(const Vector<CompositionUnderline>* = 0); | 79 void initializeSegments(const Vector<CompositionUnderline>* = 0); |
80 | 80 |
81 String m_data; | 81 String m_data; |
82 int m_activeSegmentStart; | 82 int m_activeSegmentStart; |
83 int m_activeSegmentEnd; | 83 int m_activeSegmentEnd; |
84 Vector<unsigned> m_segments; | 84 Vector<unsigned> m_segments; |
85 }; | 85 }; |
86 | 86 |
87 } // namespace WebCore | 87 } // namespace WebCore |
88 | 88 |
89 #endif // CompositionEvent_h | 89 #endif // CompositionEvent_h |
OLD | NEW |