Chromium Code Reviews| Index: ui/base/ime/ibus_client.cc |
| diff --git a/ui/base/ime/ibus_client.cc b/ui/base/ime/ibus_client.cc |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..12db43955f9acd0aebe5210d299e374fb05bc489 |
| --- /dev/null |
| +++ b/ui/base/ime/ibus_client.cc |
| @@ -0,0 +1,37 @@ |
| +// Copyright (c) 2012 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#include "ui/base/ime/ibus_client.h" |
| + |
| +#include "chromeos/dbus/dbus_thread_manager.h" |
| +#include "chromeos/dbus/ibus/ibus_input_context_client.h" |
| +#include "ui/gfx/rect.h" |
| + |
| +namespace ui { |
| +namespace internal { |
| + |
| +IBusClient::IBusClient() { |
| +} |
| + |
| +IBusClient::~IBusClient() { |
| +} |
| + |
| +IBusClient::InputMethodType IBusClient::GetInputMethodType() { |
| + // This object cannot know the type of the current IME, hence return NORMAL. |
| + return INPUT_METHOD_NORMAL; |
| +} |
| + |
| +void IBusClient::SetCursorLocation(const gfx::Rect& cursor_location, |
| + const gfx::Rect& composition_head) { |
| + chromeos::IBusInputContextClient* client = |
|
Yusuke Sato
2012/06/25 13:41:33
I prefer input_context or input_context_client.
Seigo Nonaka
2012/06/28 03:43:03
Done.
|
| + chromeos::DBusThreadManager::Get()->GetIBusInputContextClient(); |
| + DCHECK(client->IsConnected()); |
| + client->SetCursorLocation(cursor_location.x(), |
| + cursor_location.y(), |
| + cursor_location.width(), |
| + cursor_location.height()); |
| +} |
| + |
| +} // namespace internal |
| +} // namespace ui |