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 {
observer.OnRequestSwitchEngine();
}
#if defined(OS_CHROMEOS)
// IMEBridge override.
void SetCandidateWindowHandler(
chromeos::IMECandidateWindowHandlerInterface* handler) override {
......@@ -102,7 +101,6 @@ class IMEBridgeImpl : public IMEBridge {
const override {
return assistive_window_handler_;
}
#endif
private:
IMEInputContextHandlerInterface* input_context_handler_ = nullptr;
......@@ -110,12 +108,10 @@ class IMEBridgeImpl : public IMEBridge {
base::ObserverList<IMEBridgeObserver> observers_;
IMEEngineHandlerInterface::InputContext current_input_context_;
#if defined(OS_CHROMEOS)
chromeos::IMECandidateWindowHandlerInterface* candidate_window_handler_ =
nullptr;
chromeos::IMEAssistiveWindowHandlerInterface* assistive_window_handler_ =
nullptr;
#endif
DISALLOW_COPY_AND_ASSIGN(IMEBridgeImpl);
};
......
......@@ -25,7 +25,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEBridge {
public:
virtual ~IMEBridge();
#if defined(OS_CHROMEOS)
// Allocates the global instance. Must be called before any calls to Get().
static void Initialize();
......@@ -34,7 +33,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEBridge {
// Returns IMEBridge global instance. Initialize() must be called first.
static IMEBridge* Get();
#endif
// Returns current InputContextHandler. This function returns nullptr if input
// context is not ready to use.
......
......@@ -27,11 +27,9 @@ namespace ui {
class InputMethodKeyboardController;
class KeyEvent;
#if defined(OS_CHROMEOS)
namespace ime {
struct AssistiveWindowButton;
} // namespace ime
#endif // defined(OS_CHROMEOS)
// A interface to handle the engine handler method call.
class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEEngineHandlerInterface {
......@@ -125,8 +123,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEEngineHandlerInterface {
virtual ui::InputMethodKeyboardController* GetInputMethodKeyboardController()
const = 0;
#if defined(OS_CHROMEOS)
// Called when a property is activated or changed.
virtual void PropertyActivate(const std::string& property_name) = 0;
......@@ -142,7 +138,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEEngineHandlerInterface {
virtual void SetMirroringEnabled(bool mirroring_enabled) = 0;
virtual void SetCastingEnabled(bool casting_enabled) = 0;
#endif // defined(OS_CHROMEOS)
protected:
IMEEngineHandlerInterface() {}
};
......
......@@ -25,7 +25,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEInputContextHandlerInterface {
// Called when the engine commit a text.
virtual void CommitText(const std::string& text) = 0;
#if defined(OS_CHROMEOS)
// Called when the engine changes the composition range.
// Returns true if the operation was successful.
virtual bool SetCompositionRange(
......@@ -46,7 +45,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) IMEInputContextHandlerInterface {
// Called when the engine changes the selection range.
// Returns true if the operation was successful.
virtual bool SetSelectionRange(uint32_t start, uint32_t end) = 0;
#endif
// Called when the engine updates composition text.
virtual void UpdateCompositionText(const CompositionText& text,
......
......@@ -36,7 +36,6 @@ void MockIMEInputContextHandler::UpdateCompositionText(
last_update_composition_arg_.is_visible = visible;
}
#if defined(OS_CHROMEOS)
bool MockIMEInputContextHandler::SetCompositionRange(
uint32_t before,
uint32_t after,
......@@ -79,7 +78,6 @@ bool MockIMEInputContextHandler::SetSelectionRange(uint32_t start,
last_update_composition_arg_.selection = gfx::Range(start, end);
return true;
}
#endif
void MockIMEInputContextHandler::DeleteSurroundingText(int32_t offset,
uint32_t length) {
......
......@@ -38,7 +38,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) MockIMEInputContextHandler
uint32_t cursor_pos,
bool visible) override;
#if defined(OS_CHROMEOS)
bool SetCompositionRange(
uint32_t before,
uint32_t after,
......@@ -53,8 +52,6 @@ class COMPONENT_EXPORT(UI_BASE_IME_CHROMEOS) MockIMEInputContextHandler
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;
SurroundingTextInfo GetSurroundingTextInfo() 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