OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "chromeos/dbus/ibus/ibus_panel_service.h" | 5 #include "chromeos/dbus/ibus/ibus_panel_service.h" |
6 | 6 |
7 #include <string> | 7 #include <string> |
8 #include "base/bind.h" | 8 #include "base/bind.h" |
9 #include "base/callback.h" | 9 #include "base/callback.h" |
10 #include "chromeos/dbus/ibus/ibus_constants.h" | 10 #include "chromeos/dbus/ibus/ibus_constants.h" |
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
339 return; | 339 return; |
340 } | 340 } |
341 property_handler_->UpdateProperty(property); | 341 property_handler_->UpdateProperty(property); |
342 | 342 |
343 dbus::Response* response = dbus::Response::FromMethodCall(method_call); | 343 dbus::Response* response = dbus::Response::FromMethodCall(method_call); |
344 response_sender.Run(response); | 344 response_sender.Run(response); |
345 } | 345 } |
346 | 346 |
347 void SetCursorLocation(const ibus::Rect& cursor_location, | 347 void SetCursorLocation(const ibus::Rect& cursor_location, |
348 const ibus::Rect& composition_head) { | 348 const ibus::Rect& composition_head) { |
349 // TODO(nona): implement this function. | 349 if (candidate_window_handler_) |
| 350 candidate_window_handler_->SetCursorLocation(cursor_location, |
| 351 composition_head); |
350 } | 352 } |
351 | 353 |
352 // Handles FocusIn, FocusOut, StateChanged method calls from IBus, and ignores | 354 // Handles FocusIn, FocusOut, StateChanged method calls from IBus, and ignores |
353 // them. | 355 // them. |
354 void NoOperation(dbus::MethodCall* method_call, | 356 void NoOperation(dbus::MethodCall* method_call, |
355 dbus::ExportedObject::ResponseSender response_sender) { | 357 dbus::ExportedObject::ResponseSender response_sender) { |
356 if (!property_handler_) | 358 if (!property_handler_) |
357 return; | 359 return; |
358 | 360 |
359 dbus::Response* response = dbus::Response::FromMethodCall(method_call); | 361 dbus::Response* response = dbus::Response::FromMethodCall(method_call); |
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
453 IBusInputContextClient* input_context) { | 455 IBusInputContextClient* input_context) { |
454 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) { | 456 if (type == REAL_DBUS_CLIENT_IMPLEMENTATION) { |
455 return new IBusPanelServiceImpl(bus, input_context); | 457 return new IBusPanelServiceImpl(bus, input_context); |
456 } else { | 458 } else { |
457 return new IBusPanelServiceDaemonlessImpl(); | 459 return new IBusPanelServiceDaemonlessImpl(); |
458 } | 460 } |
459 } | 461 } |
460 | 462 |
461 } // namespace ibus | 463 } // namespace ibus |
462 } // namespace chromeos | 464 } // namespace chromeos |
OLD | NEW |