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/dbus_thread_manager.h" | 5 #include "chromeos/dbus/dbus_thread_manager.h" |
6 | 6 |
7 #include "base/chromeos/chromeos_version.h" | 7 #include "base/chromeos/chromeos_version.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "chromeos/chromeos_switches.h" | 10 #include "chromeos/chromeos_switches.h" |
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
349 : STUB_DBUS_CLIENT_IMPLEMENTATION; | 349 : STUB_DBUS_CLIENT_IMPLEMENTATION; |
350 | 350 |
351 if (ibus_engine_services_.find(object_path) | 351 if (ibus_engine_services_.find(object_path) |
352 == ibus_engine_services_.end()) { | 352 == ibus_engine_services_.end()) { |
353 ibus_engine_services_[object_path] = | 353 ibus_engine_services_[object_path] = |
354 IBusEngineService::Create(client_type, ibus_bus_.get(), object_path); | 354 IBusEngineService::Create(client_type, ibus_bus_.get(), object_path); |
355 } | 355 } |
356 return ibus_engine_services_[object_path]; | 356 return ibus_engine_services_[object_path]; |
357 } | 357 } |
358 | 358 |
359 // DBusThreadManager override. | |
360 virtual void RemoveIBusEngineService(const dbus::ObjectPath& object_path) { | |
361 if (ibus_engine_services_.find(object_path) != | |
362 ibus_engine_services_.end()) { | |
satorux1
2012/08/01 19:54:20
might want to add log warning? LOG(WARNING) << "Ob
Seigo Nonaka
2012/08/02 03:14:58
Yes! done.
On 2012/08/01 19:54:20, satorux1 wrote:
| |
363 return; | |
364 } | |
365 delete ibus_engine_services_[object_path]; | |
366 ibus_engine_services_.erase(object_path); | |
367 } | |
368 | |
359 scoped_ptr<base::Thread> dbus_thread_; | 369 scoped_ptr<base::Thread> dbus_thread_; |
360 scoped_refptr<dbus::Bus> system_bus_; | 370 scoped_refptr<dbus::Bus> system_bus_; |
361 scoped_refptr<dbus::Bus> ibus_bus_; | 371 scoped_refptr<dbus::Bus> ibus_bus_; |
362 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; | 372 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; |
363 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; | 373 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; |
364 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; | 374 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; |
365 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; | 375 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; |
366 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_; | 376 scoped_ptr<BluetoothNodeClient> bluetooth_node_client_; |
367 scoped_ptr<BluetoothOutOfBandClient> bluetooth_out_of_band_client_; | 377 scoped_ptr<BluetoothOutOfBandClient> bluetooth_out_of_band_client_; |
368 scoped_ptr<CashewClient> cashew_client_; | 378 scoped_ptr<CashewClient> cashew_client_; |
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
448 } | 458 } |
449 | 459 |
450 // static | 460 // static |
451 DBusThreadManager* DBusThreadManager::Get() { | 461 DBusThreadManager* DBusThreadManager::Get() { |
452 CHECK(g_dbus_thread_manager) | 462 CHECK(g_dbus_thread_manager) |
453 << "DBusThreadManager::Get() called before Initialize()"; | 463 << "DBusThreadManager::Get() called before Initialize()"; |
454 return g_dbus_thread_manager; | 464 return g_dbus_thread_manager; |
455 } | 465 } |
456 | 466 |
457 } // namespace chromeos | 467 } // namespace chromeos |
OLD | NEW |