| 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 CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_IMPL_H_ | 5 #ifndef CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_IMPL_H_ |
| 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_IMPL_H_ | 6 #define CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_IMPL_H_ |
| 7 #pragma once | 7 #pragma once |
| 8 | 8 |
| 9 #include <gio/gio.h> // GAsyncResult and related types. | 9 #include <gio/gio.h> // GAsyncResult and related types. |
| 10 #include <glib-object.h> | 10 #include <glib-object.h> |
| (...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 void ConnectBusSignals(); | 108 void ConnectBusSignals(); |
| 109 | 109 |
| 110 // Starts listening to the "focus-in", "register-properties", and | 110 // Starts listening to the "focus-in", "register-properties", and |
| 111 // "update-property" D-Bus signals from ibus-daemon. | 111 // "update-property" D-Bus signals from ibus-daemon. |
| 112 void ConnectPanelServiceSignals(); | 112 void ConnectPanelServiceSignals(); |
| 113 | 113 |
| 114 // Starts ibus-daemon if it's not yet started and |should_launch_daemon_| is | 114 // Starts ibus-daemon if it's not yet started and |should_launch_daemon_| is |
| 115 // true. | 115 // true. |
| 116 bool MaybeLaunchIBusDaemon(); | 116 bool MaybeLaunchIBusDaemon(); |
| 117 | 117 |
| 118 // Starts ibus-daemon. |
| 119 void LaunchIBusDaemon(const std::string& ibus_address); |
| 120 |
| 118 // Launches an input method procsess specified by the given command | 121 // Launches an input method procsess specified by the given command |
| 119 // line. On success, returns true and stores the process handle in | 122 // line. On success, returns true and stores the process handle in |
| 120 // |process_handle|. Otherwise, returns false, and the contents of | 123 // |process_handle|. Otherwise, returns false, and the contents of |
| 121 // |process_handle| is untouched. |watch_func| will be called when the | 124 // |process_handle| is untouched. |watch_func| will be called when the |
| 122 // process terminates. | 125 // process terminates. |
| 123 bool LaunchProcess(const std::string& command_line, | 126 bool LaunchProcess(const std::string& command_line, |
| 124 base::ProcessHandle* process_handle, | 127 base::ProcessHandle* process_handle, |
| 125 GChildWatchFunc watch_func); | 128 GChildWatchFunc watch_func); |
| 126 | 129 |
| 127 // A callback function that will be called when ibus_config_set_value_async() | 130 // A callback function that will be called when ibus_config_set_value_async() |
| (...skipping 22 matching lines...) Expand all Loading... |
| 150 // Current input context path. | 153 // Current input context path. |
| 151 std::string current_input_context_path_; | 154 std::string current_input_context_path_; |
| 152 | 155 |
| 153 // The input method ID which is currently selected. The ID is sent to the | 156 // The input method ID which is currently selected. The ID is sent to the |
| 154 // daemon when |ibus_| and |ibus_config_| connections are both established. | 157 // daemon when |ibus_| and |ibus_config_| connections are both established. |
| 155 std::string current_input_method_id_; | 158 std::string current_input_method_id_; |
| 156 | 159 |
| 157 // An object which knows all valid input methods and layout IDs. | 160 // An object which knows all valid input methods and layout IDs. |
| 158 InputMethodWhitelist whitelist_; | 161 InputMethodWhitelist whitelist_; |
| 159 | 162 |
| 163 base::WeakPtrFactory<IBusControllerImpl> weak_ptr_factory_; |
| 164 |
| 160 DISALLOW_COPY_AND_ASSIGN(IBusControllerImpl); | 165 DISALLOW_COPY_AND_ASSIGN(IBusControllerImpl); |
| 161 }; | 166 }; |
| 162 | 167 |
| 163 } // namespace input_method | 168 } // namespace input_method |
| 164 } // namespace chromeos | 169 } // namespace chromeos |
| 165 | 170 |
| 166 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_IMPL_H_ | 171 #endif // CHROME_BROWSER_CHROMEOS_INPUT_METHOD_IBUS_CONTROLLER_IMPL_H_ |
| OLD | NEW |