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

Unified Diff: chrome/browser/chromeos/input_method/input_method_engine.h

Issue 1562733002: Make InputMethodEngine to inherit from new added class InputMethodEngineBase. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove function CheckProfile(). Created 4 years, 11 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_engine.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « no previous file | chrome/browser/chromeos/input_method/input_method_engine.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698