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

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

Issue 91373004: Move DBusClient stub implementations into separate files. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Rebased. Created 7 years 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/fake_introspectable_client.h ('k') | chromeos/dbus/fake_modem_messaging_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 2013 The Chromium Authors. All rights reserved. 1 // Copyright 2013 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/ime/input_method_manager.h" 5 #include "chromeos/dbus/fake_introspectable_client.h"
6 6
7 #include "base/callback.h"
7 #include "base/logging.h" 8 #include "base/logging.h"
9 #include "dbus/object_path.h"
8 10
9 namespace chromeos { 11 namespace chromeos {
10 namespace input_method {
11 12
12 namespace { 13 FakeIntrospectableClient::FakeIntrospectableClient() {}
13 InputMethodManager* g_input_method_manager = NULL; 14
15 FakeIntrospectableClient::~FakeIntrospectableClient() {}
16
17 void FakeIntrospectableClient::Init(dbus::Bus* bus) {}
18
19 void FakeIntrospectableClient::Introspect(const std::string& service_name,
20 const dbus::ObjectPath& object_path,
21 const IntrospectCallback& callback) {
22 VLOG(1) << "Introspect: " << service_name << " " << object_path.value();
23 callback.Run(service_name, object_path, "", false);
14 } 24 }
15 25
16 // static
17 InputMethodManager* InputMethodManager::Get() {
18 return g_input_method_manager;
19 }
20
21 // static
22 void InputMethodManager::Initialize(InputMethodManager* instance) {
23 DCHECK(!g_input_method_manager) << "Do not call Initialize() multiple times.";
24 g_input_method_manager = instance;
25 }
26
27 // static
28 void InputMethodManager::Shutdown() {
29 DCHECK(g_input_method_manager)
30 << "InputMethodManager() is not initialized.";
31 delete g_input_method_manager;
32 g_input_method_manager = NULL;
33 }
34
35 } // namespace input_method
36 } // namespace chromeos 26 } // namespace chromeos
OLDNEW
« no previous file with comments | « chromeos/dbus/fake_introspectable_client.h ('k') | chromeos/dbus/fake_modem_messaging_client.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698