| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef WEBKIT_GLUE_WEBTEXTINPUT_H_ | |
| 6 #define WEBKIT_GLUE_WEBTEXTINPUT_H_ | |
| 7 | |
| 8 #include <string> | |
| 9 #include "base/basictypes.h" | |
| 10 #include "base/string16.h" | |
| 11 | |
| 12 class WebTextInput { | |
| 13 public: | |
| 14 WebTextInput() {} | |
| 15 virtual ~WebTextInput() {} | |
| 16 | |
| 17 // Inserts text to the associated frame. | |
| 18 virtual void InsertText(const string16& text) = 0; | |
| 19 | |
| 20 // Executes the given editing command on the frame. | |
| 21 virtual void DoCommand(const string16& command) = 0; | |
| 22 | |
| 23 // Sets marked text region on the frame. | |
| 24 virtual void SetMarkedText(const string16& text, | |
| 25 int32_t location, int32_t length) = 0; | |
| 26 | |
| 27 // Clears the marked text region on the frame. | |
| 28 virtual void UnMarkText() = 0; | |
| 29 | |
| 30 // Returns true if there are marked texts on the frame, returns false | |
| 31 // otherwise. | |
| 32 virtual bool HasMarkedText() = 0; | |
| 33 | |
| 34 // Writes the textual representation of the marked range on the frame to | |
| 35 // range_str. | |
| 36 virtual void MarkedRange(std::string* range_str) = 0; | |
| 37 | |
| 38 // Writes the textual representation of the selected range on the frame to | |
| 39 // range_str. | |
| 40 virtual void SelectedRange(std::string* range_str) = 0; | |
| 41 | |
| 42 // Writes the textual representation of the attributes of marked text range | |
| 43 // on the frame to attributes. | |
| 44 virtual void ValidAttributesForMarkedText(std::string* attributes) = 0; | |
| 45 | |
| 46 virtual void ConversationIdentifier() = 0; | |
| 47 virtual void SubstringFromRange(int32_t location, int32_t length) = 0; | |
| 48 virtual void AttributedSubstringFromRange(int32_t location, | |
| 49 int32_t length) = 0; | |
| 50 virtual void FirstRectForCharacterRange(int32_t location, | |
| 51 int32_t length) = 0; | |
| 52 virtual void CharacterIndexForPoint(double x, double y) = 0; | |
| 53 virtual void MakeAttributedString(const std::string& str) = 0; | |
| 54 | |
| 55 private: | |
| 56 DISALLOW_COPY_AND_ASSIGN(WebTextInput); | |
| 57 }; | |
| 58 | |
| 59 #endif // #ifndef WEBKIT_GLUE_WEBTEXTINPUT_H_ | |
| OLD | NEW |