OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2013 Google Inc. All rights reserved. | 2 * Copyright (C) 2013 Google 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 are | 5 * modification, are permitted provided that the following conditions are |
6 * met: | 6 * met: |
7 * | 7 * |
8 * * Redistributions of source code must retain the above copyright | 8 * * Redistributions of source code must retain the above copyright |
9 * notice, this list of conditions and the following disclaimer. | 9 * notice, this list of conditions and the following disclaimer. |
10 * * Redistributions in binary form must reproduce the above | 10 * * Redistributions in binary form must reproduce the above |
(...skipping 26 matching lines...) Expand all Loading... |
37 #include "wtf/PassOwnPtr.h" | 37 #include "wtf/PassOwnPtr.h" |
38 #include "wtf/RefPtr.h" | 38 #include "wtf/RefPtr.h" |
39 #include "wtf/text/AtomicString.h" | 39 #include "wtf/text/AtomicString.h" |
40 #include "wtf/text/WTFString.h" | 40 #include "wtf/text/WTFString.h" |
41 | 41 |
42 namespace blink { | 42 namespace blink { |
43 | 43 |
44 class ExecutionContext; | 44 class ExecutionContext; |
45 class InputMethodController; | 45 class InputMethodController; |
46 | 46 |
47 class InputMethodContext FINAL : public NoBaseWillBeGarbageCollectedFinalized<In
putMethodContext>, public EventTargetWithInlineData { | 47 class InputMethodContext final : public NoBaseWillBeGarbageCollectedFinalized<In
putMethodContext>, public EventTargetWithInlineData { |
48 DEFINE_WRAPPERTYPEINFO(); | 48 DEFINE_WRAPPERTYPEINFO(); |
49 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(InputMethodContext); | 49 WILL_BE_USING_GARBAGE_COLLECTED_MIXIN(InputMethodContext); |
50 public: | 50 public: |
51 static PassOwnPtrWillBeRawPtr<InputMethodContext> create(HTMLElement*); | 51 static PassOwnPtrWillBeRawPtr<InputMethodContext> create(HTMLElement*); |
52 virtual ~InputMethodContext(); | 52 virtual ~InputMethodContext(); |
53 | 53 |
54 #if !ENABLE(OILPAN) | 54 #if !ENABLE(OILPAN) |
55 void ref() { m_element->ref(); } | 55 void ref() { m_element->ref(); } |
56 void deref() { m_element->deref(); } | 56 void deref() { m_element->deref(); } |
57 #endif | 57 #endif |
58 | 58 |
59 String locale() const; | 59 String locale() const; |
60 HTMLElement* target() const; | 60 HTMLElement* target() const; |
61 unsigned compositionStartOffset(); | 61 unsigned compositionStartOffset(); |
62 unsigned compositionEndOffset(); | 62 unsigned compositionEndOffset(); |
63 void confirmComposition(); | 63 void confirmComposition(); |
64 | 64 |
65 String compositionText() const; | 65 String compositionText() const; |
66 int selectionStart() const; | 66 int selectionStart() const; |
67 int selectionEnd() const; | 67 int selectionEnd() const; |
68 const Vector<unsigned>& segments(); | 68 const Vector<unsigned>& segments(); |
69 | 69 |
70 virtual const AtomicString& interfaceName() const OVERRIDE; | 70 virtual const AtomicString& interfaceName() const override; |
71 virtual ExecutionContext* executionContext() const OVERRIDE; | 71 virtual ExecutionContext* executionContext() const override; |
72 | 72 |
73 DEFINE_ATTRIBUTE_EVENT_LISTENER(candidatewindowshow); | 73 DEFINE_ATTRIBUTE_EVENT_LISTENER(candidatewindowshow); |
74 DEFINE_ATTRIBUTE_EVENT_LISTENER(candidatewindowupdate); | 74 DEFINE_ATTRIBUTE_EVENT_LISTENER(candidatewindowupdate); |
75 DEFINE_ATTRIBUTE_EVENT_LISTENER(candidatewindowhide); | 75 DEFINE_ATTRIBUTE_EVENT_LISTENER(candidatewindowhide); |
76 | 76 |
77 void dispatchCandidateWindowShowEvent(); | 77 void dispatchCandidateWindowShowEvent(); |
78 void dispatchCandidateWindowUpdateEvent(); | 78 void dispatchCandidateWindowUpdateEvent(); |
79 void dispatchCandidateWindowHideEvent(); | 79 void dispatchCandidateWindowHideEvent(); |
80 | 80 |
81 virtual void trace(Visitor*) OVERRIDE; | 81 virtual void trace(Visitor*) override; |
82 | 82 |
83 private: | 83 private: |
84 InputMethodContext(HTMLElement*); | 84 InputMethodContext(HTMLElement*); |
85 bool hasFocus() const; | 85 bool hasFocus() const; |
86 CompositionUnderline selectedSegment() const; | 86 CompositionUnderline selectedSegment() const; |
87 InputMethodController& inputMethodController() const; | 87 InputMethodController& inputMethodController() const; |
88 | 88 |
89 #if !ENABLE(OILPAN) | 89 #if !ENABLE(OILPAN) |
90 virtual void refEventTarget() OVERRIDE { ref(); } | 90 virtual void refEventTarget() override { ref(); } |
91 virtual void derefEventTarget() OVERRIDE { deref(); } | 91 virtual void derefEventTarget() override { deref(); } |
92 #endif | 92 #endif |
93 | 93 |
94 RawPtrWillBeMember<HTMLElement> m_element; | 94 RawPtrWillBeMember<HTMLElement> m_element; |
95 Vector<unsigned> m_segments; | 95 Vector<unsigned> m_segments; |
96 }; | 96 }; |
97 | 97 |
98 } // namespace blink | 98 } // namespace blink |
99 | 99 |
100 #endif // InputMethodContext_h | 100 #endif // InputMethodContext_h |
OLD | NEW |