| Index: ui/base/ime/ime_engine_handler_interface.h
|
| diff --git a/ui/base/ime/ime_engine_handler_interface.h b/ui/base/ime/ime_engine_handler_interface.h
|
| index 6290841b3bd529f8df41d1c6c3ba52412d88553f..a394f3776b2559aab765bb14cf30117cc818de6c 100644
|
| --- a/ui/base/ime/ime_engine_handler_interface.h
|
| +++ b/ui/base/ime/ime_engine_handler_interface.h
|
| @@ -54,33 +54,6 @@ class UI_BASE_IME_EXPORT IMEEngineHandlerInterface {
|
| int flags;
|
| };
|
|
|
| - struct KeyboardEvent {
|
| - KeyboardEvent();
|
| - virtual ~KeyboardEvent();
|
| -
|
| - std::string type;
|
| - std::string key;
|
| - std::string code;
|
| - int key_code; // only used by on-screen keyboards.
|
| - std::string extension_id;
|
| - bool alt_key;
|
| - bool ctrl_key;
|
| - bool shift_key;
|
| - bool caps_lock;
|
| - };
|
| -
|
| - enum SegmentStyle {
|
| - SEGMENT_STYLE_UNDERLINE,
|
| - SEGMENT_STYLE_DOUBLE_UNDERLINE,
|
| - SEGMENT_STYLE_NO_UNDERLINE,
|
| - };
|
| -
|
| - struct SegmentInfo {
|
| - int start;
|
| - int end;
|
| - SegmentStyle style;
|
| - };
|
| -
|
| virtual ~IMEEngineHandlerInterface() {}
|
|
|
| // Called when the Chrome input field get the focus.
|
| @@ -120,15 +93,6 @@ class UI_BASE_IME_EXPORT IMEEngineHandlerInterface {
|
| // If not, InputMethodChromeOS won't feed it with key events.
|
| virtual bool IsInterestedInKeyEvent() const = 0;
|
|
|
| - // Set the current composition and associated properties.
|
| - virtual bool SetComposition(int context_id,
|
| - const char* text,
|
| - int selection_start,
|
| - int selection_end,
|
| - int cursor,
|
| - const std::vector<SegmentInfo>& segments,
|
| - std::string* error) = 0;
|
| -
|
| // Clear the current composition.
|
| virtual bool ClearComposition(int context_id, std::string* error) = 0;
|
|
|
| @@ -138,10 +102,6 @@ class UI_BASE_IME_EXPORT IMEEngineHandlerInterface {
|
| const char* text,
|
| std::string* error) = 0;
|
|
|
| - // Send the sequence of key events.
|
| - virtual bool SendKeyEvents(int context_id,
|
| - const std::vector<KeyboardEvent>& events) = 0;
|
| -
|
| // Returns true if this IME is active, false if not.
|
| virtual bool IsActive() const = 0;
|
|
|
| @@ -159,77 +119,8 @@ class UI_BASE_IME_EXPORT IMEEngineHandlerInterface {
|
| int offset,
|
| size_t number_of_chars,
|
| std::string* error) = 0;
|
| -
|
| -// ChromeOS only APIs.
|
| #if defined(OS_CHROMEOS)
|
|
|
| - enum {
|
| - MENU_ITEM_MODIFIED_LABEL = 0x0001,
|
| - MENU_ITEM_MODIFIED_STYLE = 0x0002,
|
| - MENU_ITEM_MODIFIED_VISIBLE = 0x0004,
|
| - MENU_ITEM_MODIFIED_ENABLED = 0x0008,
|
| - MENU_ITEM_MODIFIED_CHECKED = 0x0010,
|
| - MENU_ITEM_MODIFIED_ICON = 0x0020,
|
| - };
|
| -
|
| - enum MenuItemStyle {
|
| - MENU_ITEM_STYLE_NONE,
|
| - MENU_ITEM_STYLE_CHECK,
|
| - MENU_ITEM_STYLE_RADIO,
|
| - MENU_ITEM_STYLE_SEPARATOR,
|
| - };
|
| -
|
| - enum CandidateWindowPosition {
|
| - WINDOW_POS_CURSOR,
|
| - WINDOW_POS_COMPOSITTION,
|
| - };
|
| -
|
| - struct MenuItem {
|
| - MenuItem();
|
| - virtual ~MenuItem();
|
| -
|
| - std::string id;
|
| - std::string label;
|
| - MenuItemStyle style;
|
| - bool visible;
|
| - bool enabled;
|
| - bool checked;
|
| -
|
| - unsigned int modified;
|
| - std::vector<MenuItem> children;
|
| - };
|
| -
|
| - struct UsageEntry {
|
| - std::string title;
|
| - std::string body;
|
| - };
|
| -
|
| - struct Candidate {
|
| - Candidate();
|
| - virtual ~Candidate();
|
| -
|
| - std::string value;
|
| - int id;
|
| - std::string label;
|
| - std::string annotation;
|
| - UsageEntry usage;
|
| - std::vector<Candidate> candidates;
|
| - };
|
| -
|
| - struct CandidateWindowProperty {
|
| - CandidateWindowProperty();
|
| - virtual ~CandidateWindowProperty();
|
| - int page_size;
|
| - bool is_cursor_visible;
|
| - bool is_vertical;
|
| - bool show_window_at_composition;
|
| -
|
| - // Auxiliary text is typically displayed in the footer of the candidate
|
| - // window.
|
| - std::string auxiliary_text;
|
| - bool is_auxiliary_text_visible;
|
| - };
|
| -
|
| // Called when a property is activated or changed.
|
| virtual void PropertyActivate(const std::string& property_name) = 0;
|
|
|
| @@ -237,41 +128,17 @@ class UI_BASE_IME_EXPORT IMEEngineHandlerInterface {
|
| // based candidate index in lookup table.
|
| virtual void CandidateClicked(uint32_t index) = 0;
|
|
|
| - // This function returns the current property of the candidate window.
|
| - // The caller can use the returned value as the default property and
|
| - // modify some of specified items.
|
| - virtual const CandidateWindowProperty& GetCandidateWindowProperty() const = 0;
|
| -
|
| - // Change the property of the candidate window and repaint the candidate
|
| - // window widget.
|
| - virtual void SetCandidateWindowProperty(
|
| - const CandidateWindowProperty& property) = 0;
|
| -
|
| // Show or hide the candidate window.
|
| virtual bool SetCandidateWindowVisible(bool visible, std::string* error) = 0;
|
|
|
| - // Set the list of entries displayed in the candidate window.
|
| - virtual bool SetCandidates(int context_id,
|
| - const std::vector<Candidate>& candidates,
|
| - std::string* error) = 0;
|
| -
|
| // Set the position of the cursor in the candidate window.
|
| virtual bool SetCursorPosition(int context_id,
|
| int candidate_id,
|
| std::string* error) = 0;
|
| -
|
| - // Set the list of items that appears in the language menu when this IME is
|
| - // active.
|
| - virtual bool SetMenuItems(const std::vector<MenuItem>& items) = 0;
|
| -
|
| - // Update the state of the menu items.
|
| - virtual bool UpdateMenuItems(const std::vector<MenuItem>& items) = 0;
|
| -
|
| // Hides the input view window (from API call).
|
| virtual void HideInputView() = 0;
|
|
|
| #endif // defined(OS_CHROMEOS)
|
| -
|
| protected:
|
| IMEEngineHandlerInterface() {}
|
| };
|
|
|