Commit c6bacb04 authored by Darren Shen's avatar Darren Shen Committed by Commit Bot

ime: Remove OS_CHROMEOS checks within ui/base/ime/chromeos/.

All files in this directory are already Chrome OS only.

Change-Id: I1d6f953371940745c5429ba33777f533ae2a1325
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2532142Reviewed-by: default avatarJing Wang <jiwan@chromium.org>
Reviewed-by: default avatarYuichiro Hanada <yhanada@chromium.org>
Commit-Queue: Darren Shen <shend@chromium.org>
Cr-Commit-Position: refs/heads/master@{#827065}
parent f3f71bf3
...@@ -78,7 +78,6 @@ class IMEBridgeImpl : public IMEBridge { ...@@ -78,7 +78,6 @@ class IMEBridgeImpl : public IMEBridge {
observer.OnRequestSwitchEngine(); observer.OnRequestSwitchEngine();
} }
#if defined(OS_CHROMEOS)
// IMEBridge override. // IMEBridge override.
void SetCandidateWindowHandler( void SetCandidateWindowHandler(
chromeos::IMECandidateWindowHandlerInterface* handler) override { chromeos::IMECandidateWindowHandlerInterface* handler) override {
...@@ -102,7 +101,6 @@ class IMEBridgeImpl : public IMEBridge { ...@@ -102,7 +101,6 @@ class IMEBridgeImpl : public IMEBridge {
const override { const override {
return assistive_window_handler_; return assistive_window_handler_;
} }
#endif
private: private:
IMEInputContextHandlerInterface* input_context_handler_ = nullptr; IMEInputContextHandlerInterface* input_context_handler_ = nullptr;
...@@ -110,12 +108,10 @@ class IMEBridgeImpl : public IMEBridge { ...@@ -110,12 +108,10 @@ class IMEBridgeImpl : public IMEBridge {
base::ObserverList<IMEBridgeObserver> observers_; base::ObserverList<IMEBridgeObserver> observers_;
IMEEngineHandlerInterface::InputContext current_input_context_; IMEEngineHandlerInterface::InputContext current_input_context_;
#if defined(OS_CHROMEOS)
chromeos::IMECandidateWindowHandlerInterface* candidate_window_handler_ = chromeos::IMECandidateWindowHandlerInterface* candidate_window_handler_ =
nullptr; nullptr;
chromeos::IMEAssistiveWindowHandlerInterface* assistive_window_handler_ = chromeos::IMEAssistiveWindowHandlerInterface* assistive_window_handler_ =
nullptr; nullptr;
#endif
DISALLOW_COPY_AND_ASSIGN(IMEBridgeImpl); DISALLOW_COPY_AND_ASSIGN(IMEBridgeImpl);
}; };
......
...@@ -25,7 +25,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEBridge { ...@@ -25,7 +25,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEBridge {
public: public:
virtual ~IMEBridge(); virtual ~IMEBridge();
#if defined(OS_CHROMEOS)
// Allocates the global instance. Must be called before any calls to Get(). // Allocates the global instance. Must be called before any calls to Get().
static void Initialize(); static void Initialize();
...@@ -34,7 +33,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEBridge { ...@@ -34,7 +33,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEBridge {
// Returns IMEBridge global instance. Initialize() must be called first. // Returns IMEBridge global instance. Initialize() must be called first.
static IMEBridge* Get(); static IMEBridge* Get();
#endif
// Returns current InputContextHandler. This function returns nullptr if input // Returns current InputContextHandler. This function returns nullptr if input
// context is not ready to use. // context is not ready to use.
......
...@@ -27,11 +27,9 @@ namespace ui { ...@@ -27,11 +27,9 @@ namespace ui {
class InputMethodKeyboardController; class InputMethodKeyboardController;
class KeyEvent; class KeyEvent;
#if defined(OS_CHROMEOS)
namespace ime { namespace ime {
struct AssistiveWindowButton; struct AssistiveWindowButton;
} // namespace ime } // namespace ime
#endif // defined(OS_CHROMEOS)
// A interface to handle the engine handler method call. // A interface to handle the engine handler method call.
class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEEngineHandlerInterface { class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEEngineHandlerInterface {
...@@ -125,8 +123,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEEngineHandlerInterface { ...@@ -125,8 +123,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEEngineHandlerInterface {
virtual ui::InputMethodKeyboardController* GetInputMethodKeyboardController() virtual ui::InputMethodKeyboardController* GetInputMethodKeyboardController()
const = 0; const = 0;
#if defined(OS_CHROMEOS)
// Called when a property is activated or changed. // Called when a property is activated or changed.
virtual void PropertyActivate(const std::string& property_name) = 0; virtual void PropertyActivate(const std::string& property_name) = 0;
...@@ -142,7 +138,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEEngineHandlerInterface { ...@@ -142,7 +138,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEEngineHandlerInterface {
virtual void SetMirroringEnabled(bool mirroring_enabled) = 0; virtual void SetMirroringEnabled(bool mirroring_enabled) = 0;
virtual void SetCastingEnabled(bool casting_enabled) = 0; virtual void SetCastingEnabled(bool casting_enabled) = 0;
#endif // defined(OS_CHROMEOS)
protected: protected:
IMEEngineHandlerInterface() {} IMEEngineHandlerInterface() {}
}; };
......
...@@ -25,7 +25,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEInputContextHandlerInterface { ...@@ -25,7 +25,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEInputContextHandlerInterface {
// Called when the engine commit a text. // Called when the engine commit a text.
virtual void CommitText(const std::string& text) = 0; virtual void CommitText(const std::string& text) = 0;
#if defined(OS_CHROMEOS)
// Called when the engine changes the composition range. // Called when the engine changes the composition range.
// Returns true if the operation was successful. // Returns true if the operation was successful.
virtual bool SetCompositionRange( virtual bool SetCompositionRange(
...@@ -46,7 +45,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEInputContextHandlerInterface { ...@@ -46,7 +45,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEInputContextHandlerInterface {
// Called when the engine changes the selection range. // Called when the engine changes the selection range.
// Returns true if the operation was successful. // Returns true if the operation was successful.
virtual bool SetSelectionRange(uint32_t start, uint32_t end) = 0; virtual bool SetSelectionRange(uint32_t start, uint32_t end) = 0;
#endif
// Called when the engine updates composition text. // Called when the engine updates composition text.
virtual void UpdateCompositionText(const CompositionText& text, virtual void UpdateCompositionText(const CompositionText& text,
......
...@@ -36,7 +36,6 @@ void MockIMEInputContextHandler::UpdateCompositionText( ...@@ -36,7 +36,6 @@ void MockIMEInputContextHandler::UpdateCompositionText(
last_update_composition_arg_.is_visible = visible; last_update_composition_arg_.is_visible = visible;
} }
#if defined(OS_CHROMEOS)
bool MockIMEInputContextHandler::SetCompositionRange( bool MockIMEInputContextHandler::SetCompositionRange(
uint32_t before, uint32_t before,
uint32_t after, uint32_t after,
...@@ -79,7 +78,6 @@ bool MockIMEInputContextHandler::SetSelectionRange(uint32_t start, ...@@ -79,7 +78,6 @@ bool MockIMEInputContextHandler::SetSelectionRange(uint32_t start,
last_update_composition_arg_.selection = gfx::Range(start, end); last_update_composition_arg_.selection = gfx::Range(start, end);
return true; return true;
} }
#endif
void MockIMEInputContextHandler::DeleteSurroundingText(int32_t offset, void MockIMEInputContextHandler::DeleteSurroundingText(int32_t offset,
uint32_t length) { uint32_t length) {
......
...@@ -38,7 +38,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) MockIMEInputContextHandler ...@@ -38,7 +38,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) MockIMEInputContextHandler
uint32_t cursor_pos, uint32_t cursor_pos,
bool visible) override; bool visible) override;
#if defined(OS_CHROMEOS)
bool SetCompositionRange( bool SetCompositionRange(
uint32_t before, uint32_t before,
uint32_t after, uint32_t after,
...@@ -53,8 +52,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) MockIMEInputContextHandler ...@@ -53,8 +52,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) MockIMEInputContextHandler
uint32_t start, uint32_t start,
uint32_t end) override; uint32_t end) override;
bool SetSelectionRange(uint32_t start, uint32_t end) override; bool SetSelectionRange(uint32_t start, uint32_t end) override;
#endif
void DeleteSurroundingText(int32_t offset, uint32_t length) override; void DeleteSurroundingText(int32_t offset, uint32_t length) override;
SurroundingTextInfo GetSurroundingTextInfo() override; SurroundingTextInfo GetSurroundingTextInfo() override;
void SendKeyEvent(KeyEvent* event) override; void SendKeyEvent(KeyEvent* event) override;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment