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 #ifndef CHROMEOS_DBUS_IBUS_IBUS_ENGINE_SERVICE_H_ | 5 #ifndef CHROMEOS_DBUS_IBUS_IBUS_ENGINE_SERVICE_H_ |
6 #define CHROMEOS_DBUS_IBUS_IBUS_ENGINE_SERVICE_H_ | 6 #define CHROMEOS_DBUS_IBUS_IBUS_ENGINE_SERVICE_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback.h" | 10 #include "base/callback.h" |
11 #include "base/memory/scoped_vector.h" | 11 #include "base/memory/scoped_vector.h" |
12 #include "chromeos/chromeos_export.h" | 12 #include "chromeos/chromeos_export.h" |
13 #include "chromeos/dbus/dbus_client_implementation_type.h" | 13 #include "chromeos/dbus/dbus_client_implementation_type.h" |
14 #include "chromeos/dbus/ibus/ibus_constants.h" | 14 #include "chromeos/dbus/ibus/ibus_constants.h" |
15 | 15 |
16 namespace dbus { | |
17 class Bus; | |
18 class ObjectPath; | |
19 } // namespace dbus | |
20 | |
21 namespace chromeos { | 16 namespace chromeos { |
22 | 17 |
23 class IBusLookupTable; | 18 class IBusLookupTable; |
24 class IBusProperty; | 19 class IBusProperty; |
25 class IBusText; | 20 class IBusText; |
26 class IBusEngineHandlerInterface; | 21 class IBusEngineHandlerInterface; |
27 typedef ScopedVector<IBusProperty> IBusPropertyList; | 22 typedef ScopedVector<IBusProperty> IBusPropertyList; |
28 | 23 |
29 // A class to make the actual DBus method call handling for IBusEngine service. | 24 // A class to make the actual DBus method call handling for IBusEngine service. |
30 // The exported method call is used by ibus-demon to process key event, because | 25 // The exported method call is used by ibus-demon to process key event, because |
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
69 virtual void ForwardKeyEvent(uint32 keyval, uint32 keycode, uint32 state) = 0; | 64 virtual void ForwardKeyEvent(uint32 keyval, uint32 keycode, uint32 state) = 0; |
70 // Emits RequireSurroundingText signal. | 65 // Emits RequireSurroundingText signal. |
71 virtual void RequireSurroundingText() = 0; | 66 virtual void RequireSurroundingText() = 0; |
72 // Emits CommitText signal. | 67 // Emits CommitText signal. |
73 virtual void CommitText(const std::string& text) = 0; | 68 virtual void CommitText(const std::string& text) = 0; |
74 // Emits DeleteSurroundingText signal. | 69 // Emits DeleteSurroundingText signal. |
75 virtual void DeleteSurroundingText(int32 offset, uint32 length) = 0; | 70 virtual void DeleteSurroundingText(int32 offset, uint32 length) = 0; |
76 | 71 |
77 // Factory function, creates a new instance and returns ownership. | 72 // Factory function, creates a new instance and returns ownership. |
78 // For normal usage, access the singleton via DBusThreadManager::Get(). | 73 // For normal usage, access the singleton via DBusThreadManager::Get(). |
79 static CHROMEOS_EXPORT IBusEngineService* Create( | 74 static CHROMEOS_EXPORT IBusEngineService* Create(); |
80 DBusClientImplementationType type, | |
81 dbus::Bus* bus, | |
82 const dbus::ObjectPath& object_path); | |
83 | 75 |
84 protected: | 76 protected: |
85 // Create() should be used instead. | 77 // Create() should be used instead. |
86 IBusEngineService(); | 78 IBusEngineService(); |
87 | 79 |
88 private: | 80 private: |
89 DISALLOW_COPY_AND_ASSIGN(IBusEngineService); | 81 DISALLOW_COPY_AND_ASSIGN(IBusEngineService); |
90 }; | 82 }; |
91 | 83 |
92 } // namespace chromeos | 84 } // namespace chromeos |
93 | 85 |
94 #endif // CHROMEOS_DBUS_IBUS_IBUS_ENGINE_SERVICE_H_ | 86 #endif // CHROMEOS_DBUS_IBUS_IBUS_ENGINE_SERVICE_H_ |
OLD | NEW |