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

Side by Side Diff: chromeos/dbus/ibus/mock_ibus_engine_factory_service.h

Issue 68603002: Delete IBusEngineFactoryService. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased. Created 7 years, 1 month 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
OLDNEW
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CHROMEOS_DBUS_IBUS_MOCK_IBUS_ENGINE_FACTORY_SERVICE_H_
6 #define CHROMEOS_DBUS_IBUS_MOCK_IBUS_ENGINE_FACTORY_SERVICE_H_
7
8 #include <map>
9 #include <string>
10 #include "base/basictypes.h"
11 #include "base/memory/weak_ptr.h"
12 #include "chromeos/dbus/ibus/ibus_engine_factory_service.h"
13 #include "dbus/object_path.h"
14
15 namespace chromeos {
16 class MockIBusEngineFactoryService : public IBusEngineFactoryService {
17 public:
18 MockIBusEngineFactoryService();
19 virtual ~MockIBusEngineFactoryService();
20
21 virtual void SetCreateEngineHandler(
22 const std::string& engine_id,
23 const CreateEngineHandler& create_engine_handler) OVERRIDE;
24 virtual void UnsetCreateEngineHandler(
25 const std::string& engine_id) OVERRIDE;
26 virtual dbus::ObjectPath GenerateUniqueObjectPath() OVERRIDE;
27
28 bool CallCreateEngine(const std::string& engine_id);
29
30 int set_create_engine_handler_call_count() const {
31 return set_create_engine_handler_call_count_;
32 }
33
34 int unset_create_engine_handler_call_count() const {
35 return unset_create_engine_handler_call_count_;
36 }
37
38 dbus::ObjectPath GetObjectPathByEngineId(const std::string& engine_id);
39
40 private:
41 void OnEngineCreated(const std::string& engine_id,
42 const dbus::ObjectPath& path);
43
44 std::map<std::string, CreateEngineHandler> handler_map_;
45 std::map<std::string, dbus::ObjectPath> object_path_map_;
46 int set_create_engine_handler_call_count_;
47 int unset_create_engine_handler_call_count_;
48 base::WeakPtrFactory<MockIBusEngineFactoryService> weak_ptr_factory_;
49
50 DISALLOW_COPY_AND_ASSIGN(MockIBusEngineFactoryService);
51 };
52
53 } // namespace chromeos
54
55 #endif // CHROMEOS_DBUS_IBUS_MOCK_IBUS_ENGINE_FACTORY_SERVICE_H_
OLDNEW
« no previous file with comments | « chromeos/dbus/ibus/ibus_engine_factory_service.cc ('k') | chromeos/dbus/ibus/mock_ibus_engine_factory_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698