Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(231)

Side by Side Diff: chromeos/dbus/dbus_thread_manager.cc

Issue 11783053: Clean Up: Remove ibus namespace. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.h ('k') | chromeos/dbus/ibus/ibus_client.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 <map> 7 #include <map>
8 8
9 #include "base/chromeos/chromeos_version.h" 9 #include "base/chromeos/chromeos_version.h"
10 #include "base/command_line.h" 10 #include "base/command_line.h"
(...skipping 167 matching lines...) Expand 10 before | Expand all | Expand 10 after
178 178
179 ibus_client_.reset( 179 ibus_client_.reset(
180 IBusClient::Create(client_type, ibus_bus_.get())); 180 IBusClient::Create(client_type, ibus_bus_.get()));
181 ibus_config_client_.reset( 181 ibus_config_client_.reset(
182 IBusConfigClient::Create(client_type, ibus_bus_.get())); 182 IBusConfigClient::Create(client_type, ibus_bus_.get()));
183 ibus_input_context_client_.reset( 183 ibus_input_context_client_.reset(
184 IBusInputContextClient::Create(client_type)); 184 IBusInputContextClient::Create(client_type));
185 ibus_engine_factory_service_.reset( 185 ibus_engine_factory_service_.reset(
186 IBusEngineFactoryService::Create(ibus_bus_.get(), client_type)); 186 IBusEngineFactoryService::Create(ibus_bus_.get(), client_type));
187 ibus_panel_service_.reset( 187 ibus_panel_service_.reset(
188 ibus::IBusPanelService::Create(client_type, 188 IBusPanelService::Create(client_type,
189 ibus_bus_.get(), 189 ibus_bus_.get(),
190 ibus_input_context_client_.get())); 190 ibus_input_context_client_.get()));
191 191
192 ibus_engine_services_.clear(); 192 ibus_engine_services_.clear();
193 } 193 }
194 194
195 // DBusThreadManager overrides: 195 // DBusThreadManager overrides:
196 virtual dbus::Bus* GetSystemBus() OVERRIDE { 196 virtual dbus::Bus* GetSystemBus() OVERRIDE {
197 return system_bus_.get(); 197 return system_bus_.get();
198 } 198 }
199 199
200 virtual dbus::Bus* GetIBusBus() OVERRIDE { 200 virtual dbus::Bus* GetIBusBus() OVERRIDE {
(...skipping 130 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 const dbus::ObjectPath& object_path) OVERRIDE { 331 const dbus::ObjectPath& object_path) OVERRIDE {
332 if (ibus_engine_services_.find(object_path) != 332 if (ibus_engine_services_.find(object_path) !=
333 ibus_engine_services_.end()) { 333 ibus_engine_services_.end()) {
334 LOG(WARNING) << "Object path not found: " << object_path.value(); 334 LOG(WARNING) << "Object path not found: " << object_path.value();
335 return; 335 return;
336 } 336 }
337 delete ibus_engine_services_[object_path]; 337 delete ibus_engine_services_[object_path];
338 ibus_engine_services_.erase(object_path); 338 ibus_engine_services_.erase(object_path);
339 } 339 }
340 340
341 virtual ibus::IBusPanelService* GetIBusPanelService() OVERRIDE { 341 virtual IBusPanelService* GetIBusPanelService() OVERRIDE {
342 return ibus_panel_service_.get(); 342 return ibus_panel_service_.get();
343 } 343 }
344 344
345 scoped_ptr<base::Thread> dbus_thread_; 345 scoped_ptr<base::Thread> dbus_thread_;
346 scoped_refptr<dbus::Bus> system_bus_; 346 scoped_refptr<dbus::Bus> system_bus_;
347 scoped_refptr<dbus::Bus> ibus_bus_; 347 scoped_refptr<dbus::Bus> ibus_bus_;
348 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_; 348 scoped_ptr<BluetoothAdapterClient> bluetooth_adapter_client_;
349 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_; 349 scoped_ptr<BluetoothDeviceClient> bluetooth_device_client_;
350 scoped_ptr<BluetoothInputClient> bluetooth_input_client_; 350 scoped_ptr<BluetoothInputClient> bluetooth_input_client_;
351 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_; 351 scoped_ptr<BluetoothManagerClient> bluetooth_manager_client_;
(...skipping 15 matching lines...) Expand all
367 scoped_ptr<PowerManagerClient> power_manager_client_; 367 scoped_ptr<PowerManagerClient> power_manager_client_;
368 scoped_ptr<SessionManagerClient> session_manager_client_; 368 scoped_ptr<SessionManagerClient> session_manager_client_;
369 scoped_ptr<SMSClient> sms_client_; 369 scoped_ptr<SMSClient> sms_client_;
370 scoped_ptr<SpeechSynthesizerClient> speech_synthesizer_client_; 370 scoped_ptr<SpeechSynthesizerClient> speech_synthesizer_client_;
371 scoped_ptr<UpdateEngineClient> update_engine_client_; 371 scoped_ptr<UpdateEngineClient> update_engine_client_;
372 scoped_ptr<IBusClient> ibus_client_; 372 scoped_ptr<IBusClient> ibus_client_;
373 scoped_ptr<IBusConfigClient> ibus_config_client_; 373 scoped_ptr<IBusConfigClient> ibus_config_client_;
374 scoped_ptr<IBusInputContextClient> ibus_input_context_client_; 374 scoped_ptr<IBusInputContextClient> ibus_input_context_client_;
375 scoped_ptr<IBusEngineFactoryService> ibus_engine_factory_service_; 375 scoped_ptr<IBusEngineFactoryService> ibus_engine_factory_service_;
376 std::map<dbus::ObjectPath, IBusEngineService*> ibus_engine_services_; 376 std::map<dbus::ObjectPath, IBusEngineService*> ibus_engine_services_;
377 scoped_ptr<ibus::IBusPanelService> ibus_panel_service_; 377 scoped_ptr<IBusPanelService> ibus_panel_service_;
378 378
379 std::string ibus_address_; 379 std::string ibus_address_;
380 380
381 ObserverList<DBusThreadManagerObserver> observers_; 381 ObserverList<DBusThreadManagerObserver> observers_;
382 }; 382 };
383 383
384 // static 384 // static
385 void DBusThreadManager::Initialize() { 385 void DBusThreadManager::Initialize() {
386 // Ignore Initialize() if we set a test DBusThreadManager. 386 // Ignore Initialize() if we set a test DBusThreadManager.
387 if (g_dbus_thread_manager_set_for_testing) 387 if (g_dbus_thread_manager_set_for_testing)
(...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after
447 } 447 }
448 448
449 // static 449 // static
450 DBusThreadManager* DBusThreadManager::Get() { 450 DBusThreadManager* DBusThreadManager::Get() {
451 CHECK(g_dbus_thread_manager) 451 CHECK(g_dbus_thread_manager)
452 << "DBusThreadManager::Get() called before Initialize()"; 452 << "DBusThreadManager::Get() called before Initialize()";
453 return g_dbus_thread_manager; 453 return g_dbus_thread_manager;
454 } 454 }
455 455
456 } // namespace chromeos 456 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/dbus_thread_manager.h ('k') | chromeos/dbus/ibus/ibus_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698