| Index: chrome/browser/chromeos/input_method/input_method_engine.h
|
| diff --git a/chrome/browser/chromeos/input_method/input_method_engine.h b/chrome/browser/chromeos/input_method/input_method_engine.h
|
| index 9687222fca4e7fbcf1addd19feb2774c70e963ef..7ffabc537f3649bce787ef4eab648ffeb589c897 100644
|
| --- a/chrome/browser/chromeos/input_method/input_method_engine.h
|
| +++ b/chrome/browser/chromeos/input_method/input_method_engine.h
|
| @@ -12,6 +12,7 @@
|
| #include <string>
|
| #include <vector>
|
| #include "base/time/time.h"
|
| +#include "chrome/browser/input_method/input_method_engine_base.h"
|
| #include "ui/base/ime/chromeos/input_method_descriptor.h"
|
| #include "ui/base/ime/ime_engine_handler_interface.h"
|
| #include "ui/base/ime/ime_engine_observer.h"
|
| @@ -31,31 +32,19 @@ struct InputMethodMenuItem;
|
| } // namespace ime
|
| } // namespace ui
|
|
|
| +namespace input_method {
|
| +class InputMethodEngineBase;
|
| +}
|
| +
|
| namespace chromeos {
|
|
|
| -class InputMethodEngine : public ui::IMEEngineHandlerInterface {
|
| +class InputMethodEngine : public ::input_method::InputMethodEngineBase {
|
| public:
|
| InputMethodEngine();
|
|
|
| ~InputMethodEngine() override;
|
|
|
| - void Initialize(scoped_ptr<ui::IMEEngineObserver> observer,
|
| - const char* extension_id,
|
| - Profile* profile);
|
| -
|
| // IMEEngineHandlerInterface overrides.
|
| - const std::string& GetActiveComponentId() const override;
|
| - bool SetComposition(int context_id,
|
| - const char* text,
|
| - int selection_start,
|
| - int selection_end,
|
| - int cursor,
|
| - const std::vector<SegmentInfo>& segments,
|
| - std::string* error) override;
|
| - bool ClearComposition(int context_id, std::string* error) override;
|
| - bool CommitText(int context_id,
|
| - const char* text,
|
| - std::string* error) override;
|
| bool SendKeyEvents(int context_id,
|
| const std::vector<KeyboardEvent>& events) override;
|
| const CandidateWindowProperty& GetCandidateWindowProperty() const override;
|
| @@ -71,35 +60,12 @@ class InputMethodEngine : public ui::IMEEngineHandlerInterface {
|
| bool SetMenuItems(const std::vector<MenuItem>& items) override;
|
| bool UpdateMenuItems(const std::vector<MenuItem>& items) override;
|
| bool IsActive() const override;
|
| - bool DeleteSurroundingText(int context_id,
|
| - int offset,
|
| - size_t number_of_chars,
|
| - std::string* error) override;
|
| -
|
| - // IMEEngineHandlerInterface overrides.
|
| - void FocusIn(const ui::IMEEngineHandlerInterface::InputContext& input_context)
|
| - override;
|
| - void FocusOut() override;
|
| void Enable(const std::string& component_id) override;
|
| - void Disable() override;
|
| void PropertyActivate(const std::string& property_name) override;
|
| - void Reset() override;
|
| - void ProcessKeyEvent(const ui::KeyEvent& key_event,
|
| - KeyEventDoneCallback& callback) override;
|
| void CandidateClicked(uint32_t index) override;
|
| - void SetSurroundingText(const std::string& text,
|
| - uint32_t cursor_pos,
|
| - uint32_t anchor_pos,
|
| - uint32_t offset_pos) override;
|
| void HideInputView() override;
|
| - void SetCompositionBounds(const std::vector<gfx::Rect>& bounds) override;
|
| -
|
| - int GetCotextIdForTesting() { return context_id_; }
|
| -
|
| - bool IsInterestedInKeyEvent() const override;
|
|
|
| private:
|
| - bool CheckProfile() const;
|
| // Converts MenuItem to InputMethodMenuItem.
|
| void MenuItemToProperty(const MenuItem& item,
|
| ui::ime::InputMethodMenuItem* property);
|
| @@ -107,27 +73,6 @@ class InputMethodEngine : public ui::IMEEngineHandlerInterface {
|
| // Enables overriding input view page to Virtual Keyboard window.
|
| void EnableInputView();
|
|
|
| - ui::TextInputType current_input_type_;
|
| -
|
| - // ID that is used for the current input context. False if there is no focus.
|
| - int context_id_;
|
| -
|
| - // Next id that will be assigned to a context.
|
| - int next_context_id_;
|
| -
|
| - // The input_component ID in IME extension's manifest.
|
| - std::string active_component_id_;
|
| -
|
| - // The IME extension ID.
|
| - std::string extension_id_;
|
| -
|
| - // The observer object recieving events for this IME.
|
| - scoped_ptr<ui::IMEEngineObserver> observer_;
|
| -
|
| - // The current preedit text, and it's cursor position.
|
| - scoped_ptr<ui::CompositionText> composition_text_;
|
| - int composition_cursor_;
|
| -
|
| // The current candidate window.
|
| scoped_ptr<ui::CandidateWindow> candidate_window_;
|
|
|
| @@ -142,12 +87,6 @@ class InputMethodEngine : public ui::IMEEngineHandlerInterface {
|
|
|
| // Mapping of candidate id to index.
|
| std::map<int, int> candidate_indexes_;
|
| -
|
| - // Used with SendKeyEvents and ProcessKeyEvent to check if the key event
|
| - // sent to ProcessKeyEvent is sent by SendKeyEvents.
|
| - const ui::KeyEvent* sent_key_event_;
|
| -
|
| - Profile* profile_;
|
| };
|
|
|
| } // namespace chromeos
|
|
|