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

Side by Side Diff: webkit/plugins/ppapi/ppapi_plugin_instance.h

Issue 10170014: Move text input API to Instance. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 8 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 unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 5 #ifndef WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 6 #define WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
7 7
8 #include <set> 8 #include <set>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after
173 // Handlers for composition events. 173 // Handlers for composition events.
174 bool HandleCompositionStart(const string16& text); 174 bool HandleCompositionStart(const string16& text);
175 bool HandleCompositionUpdate( 175 bool HandleCompositionUpdate(
176 const string16& text, 176 const string16& text,
177 const std::vector<WebKit::WebCompositionUnderline>& underlines, 177 const std::vector<WebKit::WebCompositionUnderline>& underlines,
178 int selection_start, 178 int selection_start,
179 int selection_end); 179 int selection_end);
180 bool HandleCompositionEnd(const string16& text); 180 bool HandleCompositionEnd(const string16& text);
181 bool HandleTextInput(const string16& text); 181 bool HandleTextInput(const string16& text);
182 182
183 // Implementation of composition API.
184 void UpdateCaretPosition(const gfx::Rect& caret,
185 const gfx::Rect& bounding_box);
186 void SetTextInputType(ui::TextInputType type);
187 void SelectionChanged();
188 void UpdateSurroundingText(const std::string& text,
189 size_t caret, size_t anchor);
190
191 // Gets the current text input status. 183 // Gets the current text input status.
192 ui::TextInputType text_input_type() const { return text_input_type_; } 184 ui::TextInputType text_input_type() const { return text_input_type_; }
193 gfx::Rect GetCaretBounds() const; 185 gfx::Rect GetCaretBounds() const;
194 bool IsPluginAcceptingCompositionEvents() const; 186 bool IsPluginAcceptingCompositionEvents() const;
195 void GetSurroundingText(string16* text, ui::Range* range) const; 187 void GetSurroundingText(string16* text, ui::Range* range) const;
196 188
197 // Notifications about focus changes, see has_webkit_focus_ below. 189 // Notifications about focus changes, see has_webkit_focus_ below.
198 void SetWebKitFocus(bool has_focus); 190 void SetWebKitFocus(bool has_focus);
199 void SetContentAreaFocus(bool has_focus); 191 void SetContentAreaFocus(bool has_focus);
200 192
(...skipping 174 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 double minimum_factor, 367 double minimum_factor,
376 double maximium_factor) OVERRIDE; 368 double maximium_factor) OVERRIDE;
377 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE; 369 virtual void PostMessage(PP_Instance instance, PP_Var message) OVERRIDE;
378 virtual PP_Bool SetCursor(PP_Instance instance, 370 virtual PP_Bool SetCursor(PP_Instance instance,
379 PP_MouseCursor_Type type, 371 PP_MouseCursor_Type type,
380 PP_Resource image, 372 PP_Resource image,
381 const PP_Point* hot_spot) OVERRIDE; 373 const PP_Point* hot_spot) OVERRIDE;
382 virtual int32_t LockMouse(PP_Instance instance, 374 virtual int32_t LockMouse(PP_Instance instance,
383 PP_CompletionCallback callback) OVERRIDE; 375 PP_CompletionCallback callback) OVERRIDE;
384 virtual void UnlockMouse(PP_Instance instance) OVERRIDE; 376 virtual void UnlockMouse(PP_Instance instance) OVERRIDE;
377 virtual void SetTextInputType(PP_Instance instance,
378 PP_TextInput_Type type) OVERRIDE;
379 virtual void UpdateCaretPosition(PP_Instance instance,
380 const PP_Rect& caret,
381 const PP_Rect& bounding_box) OVERRIDE;
382 virtual void CancelCompositionText(PP_Instance instance) OVERRIDE;
383 virtual void SelectionChanged(PP_Instance instance) OVERRIDE;
384 virtual void UpdateSurroundingText(PP_Instance instance,
385 const char* text,
386 uint32_t caret,
387 uint32_t anchor) OVERRIDE;
385 virtual PP_Var ResolveRelativeToDocument( 388 virtual PP_Var ResolveRelativeToDocument(
386 PP_Instance instance, 389 PP_Instance instance,
387 PP_Var relative, 390 PP_Var relative,
388 PP_URLComponents_Dev* components) OVERRIDE; 391 PP_URLComponents_Dev* components) OVERRIDE;
389 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE; 392 virtual PP_Bool DocumentCanRequest(PP_Instance instance, PP_Var url) OVERRIDE;
390 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance, 393 virtual PP_Bool DocumentCanAccessDocument(PP_Instance instance,
391 PP_Instance target) OVERRIDE; 394 PP_Instance target) OVERRIDE;
392 virtual PP_Var GetDocumentURL(PP_Instance instance, 395 virtual PP_Var GetDocumentURL(PP_Instance instance,
393 PP_URLComponents_Dev* components) OVERRIDE; 396 PP_URLComponents_Dev* components) OVERRIDE;
394 virtual PP_Var GetPluginInstanceURL( 397 virtual PP_Var GetPluginInstanceURL(
(...skipping 244 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 // The Flash proxy is associated with the instance. 642 // The Flash proxy is associated with the instance.
640 PPB_Flash_Impl flash_impl_; 643 PPB_Flash_Impl flash_impl_;
641 644
642 DISALLOW_COPY_AND_ASSIGN(PluginInstance); 645 DISALLOW_COPY_AND_ASSIGN(PluginInstance);
643 }; 646 };
644 647
645 } // namespace ppapi 648 } // namespace ppapi
646 } // namespace webkit 649 } // namespace webkit
647 650
648 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_ 651 #endif // WEBKIT_PLUGINS_PPAPI_PPAPI_PLUGIN_INSTANCE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698