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 "chrome/browser/chromeos/input_method/ibus_controller_impl.h" | 5 #include "chrome/browser/chromeos/input_method/ibus_controller_impl.h" |
6 | 6 |
7 #include <algorithm> // for std::reverse. | 7 #include <algorithm> // for std::reverse. |
8 #include <cstdio> | 8 #include <cstdio> |
9 #include <cstring> // for std::strcmp. | 9 #include <cstring> // for std::strcmp. |
10 #include <set> | 10 #include <set> |
(...skipping 228 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
239 return StartIBusDaemon(); | 239 return StartIBusDaemon(); |
240 } | 240 } |
241 return true; | 241 return true; |
242 } | 242 } |
243 | 243 |
244 void IBusControllerImpl::Reset() { | 244 void IBusControllerImpl::Reset() { |
245 if (!IBusConnectionsAreAlive()) | 245 if (!IBusConnectionsAreAlive()) |
246 return; | 246 return; |
247 IBusInputContextClient* client | 247 IBusInputContextClient* client |
248 = DBusThreadManager::Get()->GetIBusInputContextClient(); | 248 = DBusThreadManager::Get()->GetIBusInputContextClient(); |
249 if (client) | 249 if (client && client->IsObjectProxyReady()) |
satorux1
2013/02/13 01:07:43
please add some comment why we don't need to call
Seigo Nonaka
2013/02/13 01:17:55
Done.
| |
250 client->Reset(); | 250 client->Reset(); |
251 } | 251 } |
252 | 252 |
253 bool IBusControllerImpl::Stop() { | 253 bool IBusControllerImpl::Stop() { |
254 if (ibus_daemon_status_ == IBUS_DAEMON_SHUTTING_DOWN || | 254 if (ibus_daemon_status_ == IBUS_DAEMON_SHUTTING_DOWN || |
255 ibus_daemon_status_ == IBUS_DAEMON_STOP) { | 255 ibus_daemon_status_ == IBUS_DAEMON_STOP) { |
256 return true; | 256 return true; |
257 } | 257 } |
258 | 258 |
259 ibus_daemon_status_ = IBUS_DAEMON_SHUTTING_DOWN; | 259 ibus_daemon_status_ = IBUS_DAEMON_SHUTTING_DOWN; |
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
604 | 604 |
605 // static | 605 // static |
606 bool IBusControllerImpl::FindAndUpdatePropertyForTesting( | 606 bool IBusControllerImpl::FindAndUpdatePropertyForTesting( |
607 const chromeos::input_method::InputMethodProperty& new_prop, | 607 const chromeos::input_method::InputMethodProperty& new_prop, |
608 chromeos::input_method::InputMethodPropertyList* prop_list) { | 608 chromeos::input_method::InputMethodPropertyList* prop_list) { |
609 return FindAndUpdateProperty(new_prop, prop_list); | 609 return FindAndUpdateProperty(new_prop, prop_list); |
610 } | 610 } |
611 | 611 |
612 } // namespace input_method | 612 } // namespace input_method |
613 } // namespace chromeos | 613 } // namespace chromeos |
OLD | NEW |