OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. | 2 * Copyright (C) 2009, 2012 Google Inc. All rights reserved. |
3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. | 3 * Copyright (C) 2014 Opera Software ASA. All rights reserved. |
4 * | 4 * |
5 * Redistribution and use in source and binary forms, with or without | 5 * Redistribution and use in source and binary forms, with or without |
6 * modification, are permitted provided that the following conditions are | 6 * modification, are permitted provided that the following conditions are |
7 * met: | 7 * met: |
8 * | 8 * |
9 * * Redistributions of source code must retain the above copyright | 9 * * Redistributions of source code must retain the above copyright |
10 * notice, this list of conditions and the following disclaimer. | 10 * notice, this list of conditions and the following disclaimer. |
(...skipping 80 matching lines...) Loading... |
91 // NOTE: This container doesn't necessarily own this plugin. For example, | 91 // NOTE: This container doesn't necessarily own this plugin. For example, |
92 // if the container has been assigned a new plugin, then the container will | 92 // if the container has been assigned a new plugin, then the container will |
93 // own the new plugin, not this old plugin. | 93 // own the new plugin, not this old plugin. |
94 virtual WebPluginContainer* container() const { return nullptr; } | 94 virtual WebPluginContainer* container() const { return nullptr; } |
95 | 95 |
96 virtual v8::Local<v8::Object> v8ScriptableObject(v8::Isolate*) { return v8::
Local<v8::Object>(); } | 96 virtual v8::Local<v8::Object> v8ScriptableObject(v8::Isolate*) { return v8::
Local<v8::Object>(); } |
97 | 97 |
98 virtual bool supportsKeyboardFocus() const { return false; } | 98 virtual bool supportsKeyboardFocus() const { return false; } |
99 virtual bool supportsEditCommands() const { return false; } | 99 virtual bool supportsEditCommands() const { return false; } |
100 // Returns true if this plugin supports input method, which implements | 100 // Returns true if this plugin supports input method, which implements |
101 // setComposition() and confirmComposition() below. | 101 // setComposition(), commitText() and finishComposingText() below. |
102 virtual bool supportsInputMethod() const { return false; } | 102 virtual bool supportsInputMethod() const { return false; } |
103 | 103 |
104 virtual bool canProcessDrag() const { return false; } | 104 virtual bool canProcessDrag() const { return false; } |
105 | 105 |
106 virtual void updateAllLifecyclePhases() = 0; | 106 virtual void updateAllLifecyclePhases() = 0; |
107 virtual void paint(WebCanvas*, const WebRect&) = 0; | 107 virtual void paint(WebCanvas*, const WebRect&) = 0; |
108 | 108 |
109 // Coordinates are relative to the containing window. | 109 // Coordinates are relative to the containing window. |
110 virtual void updateGeometry( | 110 virtual void updateGeometry( |
111 const WebRect& windowRect, const WebRect& clipRect, | 111 const WebRect& windowRect, const WebRect& clipRect, |
(...skipping 35 matching lines...) Loading... |
147 virtual bool hasSelection() const { return false; } | 147 virtual bool hasSelection() const { return false; } |
148 virtual WebString selectionAsText() const { return WebString(); } | 148 virtual WebString selectionAsText() const { return WebString(); } |
149 virtual WebString selectionAsMarkup() const { return WebString(); } | 149 virtual WebString selectionAsMarkup() const { return WebString(); } |
150 | 150 |
151 virtual bool executeEditCommand(const WebString& name) { return false; } | 151 virtual bool executeEditCommand(const WebString& name) { return false; } |
152 virtual bool executeEditCommand(const WebString& name, const WebString& valu
e) { return false; } | 152 virtual bool executeEditCommand(const WebString& name, const WebString& valu
e) { return false; } |
153 | 153 |
154 // Sets composition text from input method, and returns true if the | 154 // Sets composition text from input method, and returns true if the |
155 // composition is set successfully. | 155 // composition is set successfully. |
156 virtual bool setComposition(const WebString& text, const WebVector<WebCompos
itionUnderline>& underlines, int selectionStart, int selectionEnd) { return fals
e; } | 156 virtual bool setComposition(const WebString& text, const WebVector<WebCompos
itionUnderline>& underlines, int selectionStart, int selectionEnd) { return fals
e; } |
157 // Confirms an ongoing composition and returns true if there is an ongoing | 157 |
158 // composition or the text is inserted. | 158 // Deletes the ongoing composition if any, inserts the specified text, and |
159 virtual bool confirmComposition(const WebString& text, WebWidget::ConfirmCom
positionBehavior selectionBehavior) { return false; } | 159 // moves the caret according to relativeCaretPosition. |
| 160 virtual bool commitText(const WebString& text, int relativeCaretPosition) {
return false; } |
| 161 |
| 162 // Confirms an ongoing composition; holds or moves selections accroding to |
| 163 // selectionBehavior. |
| 164 virtual bool finishComposingText(WebWidget::ConfirmCompositionBehavior selec
tionBehavior) { return false; } |
| 165 |
160 // Deletes the current selection plus the specified number of characters | 166 // Deletes the current selection plus the specified number of characters |
161 // before and after the selection or caret. | 167 // before and after the selection or caret. |
162 virtual void extendSelectionAndDelete(int before, int after) { } | 168 virtual void extendSelectionAndDelete(int before, int after) { } |
163 // If the given position is over a link, returns the absolute url. | 169 // If the given position is over a link, returns the absolute url. |
164 // Otherwise an empty url is returned. | 170 // Otherwise an empty url is returned. |
165 virtual WebURL linkAtPosition(const WebPoint& position) const { return WebUR
L(); } | 171 virtual WebURL linkAtPosition(const WebPoint& position) const { return WebUR
L(); } |
166 | 172 |
167 // Find interface. | 173 // Find interface. |
168 // Start a new search. The plugin should search for a little bit at a time
so that it | 174 // Start a new search. The plugin should search for a little bit at a time
so that it |
169 // doesn't block the thread in case of a large document. The results, along
with the | 175 // doesn't block the thread in case of a large document. The results, along
with the |
(...skipping 17 matching lines...) Loading... |
187 | 193 |
188 virtual bool isPlaceholder() { return true; } | 194 virtual bool isPlaceholder() { return true; } |
189 | 195 |
190 protected: | 196 protected: |
191 ~WebPlugin() { } | 197 ~WebPlugin() { } |
192 }; | 198 }; |
193 | 199 |
194 } // namespace blink | 200 } // namespace blink |
195 | 201 |
196 #endif | 202 #endif |
OLD | NEW |