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

Side by Side Diff: dbus/mock_exported_object.h

Issue 9378039: dbus: add ObjectPath type (Closed) Base URL: http://git.chromium.org/git/chromium/src@master
Patch Set: add patch for cryptohome_client Created 8 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
« no previous file with comments | « dbus/mock_bus.h ('k') | dbus/mock_exported_object.cc » ('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) 2011 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 #ifndef DBUS_MOCK_EXPORTED_OBJECT_H_ 5 #ifndef DBUS_MOCK_EXPORTED_OBJECT_H_
6 #define DBUS_MOCK_EXPORTED_OBJECT_H_ 6 #define DBUS_MOCK_EXPORTED_OBJECT_H_
7 #pragma once 7 #pragma once
8 8
9 #include <string> 9 #include <string>
10 10
11 #include "dbus/exported_object.h" 11 #include "dbus/exported_object.h"
12 #include "dbus/object_path.h"
12 #include "testing/gmock/include/gmock/gmock.h" 13 #include "testing/gmock/include/gmock/gmock.h"
13 14
14 namespace dbus { 15 namespace dbus {
15 16
16 // Mock for ExportedObject. 17 // Mock for ExportedObject.
17 class MockExportedObject : public ExportedObject { 18 class MockExportedObject : public ExportedObject {
18 public: 19 public:
19 MockExportedObject(Bus* bus, 20 MockExportedObject(Bus* bus,
20 const std::string& service_name, 21 const std::string& service_name,
21 const std::string& object_path); 22 const ObjectPath& object_path);
22 virtual ~MockExportedObject(); 23 virtual ~MockExportedObject();
23 24
24 MOCK_METHOD3(ExportMethodAndBlock, 25 MOCK_METHOD3(ExportMethodAndBlock,
25 bool(const std::string& interface_name, 26 bool(const std::string& interface_name,
26 const std::string& method_name, 27 const std::string& method_name,
27 MethodCallCallback method_call_callback)); 28 MethodCallCallback method_call_callback));
28 MOCK_METHOD4(ExportMethod, 29 MOCK_METHOD4(ExportMethod,
29 void(const std::string& interface_name, 30 void(const std::string& interface_name,
30 const std::string& method_name, 31 const std::string& method_name,
31 MethodCallCallback method_call_callback, 32 MethodCallCallback method_call_callback,
32 OnExportedCallback on_exported_callback)); 33 OnExportedCallback on_exported_callback));
33 MOCK_METHOD1(SendSignal, void(Signal* signal)); 34 MOCK_METHOD1(SendSignal, void(Signal* signal));
34 MOCK_METHOD0(Unregister, void()); 35 MOCK_METHOD0(Unregister, void());
35 }; 36 };
36 37
37 } // namespace dbus 38 } // namespace dbus
38 39
39 #endif // DBUS_MOCK_EXPORTED_OBJECT_H_ 40 #endif // DBUS_MOCK_EXPORTED_OBJECT_H_
OLDNEW
« no previous file with comments | « dbus/mock_bus.h ('k') | dbus/mock_exported_object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698