summaryrefslogtreecommitdiffstats
path: root/chrome/browser/chromeos/dbus/mock_introspectable_client.h
diff options
context:
space:
mode:
authorkeybuk@google.com <keybuk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 21:40:47 +0000
committerkeybuk@google.com <keybuk@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2012-03-15 21:40:47 +0000
commit39666aacee1d65b914e44f3ffe9ee0b56a1cca84 (patch)
tree95d2d58821cfd1a8b2fd98635794aaa90653a80d /chrome/browser/chromeos/dbus/mock_introspectable_client.h
parentb26a58e3a53b757734ad5e62ca25fb64a7382081 (diff)
downloadchromium_src-39666aacee1d65b914e44f3ffe9ee0b56a1cca84.zip
chromium_src-39666aacee1d65b914e44f3ffe9ee0b56a1cca84.tar.gz
chromium_src-39666aacee1d65b914e44f3ffe9ee0b56a1cca84.tar.bz2
dbus: add client for Introspectable interface
The D-Bus specification defines the org.freedesktop.DBus.Introspectable interface that may be implemented by any D-Bus object in order to provide introspection data. Provide a client for this interface so that Chrome may introspect arbitrary objects, retrieving the XML introspection data for them for whatever means it sees fit. Also provide a static function to extract a list of interfaces from the XML data, additional such functions can be added as people need them (e.g. list of methods or signals for an interface, list of child nodes, etc.). BUG=none TEST=included unit test, and verified object call on Chrome OS Change-Id: I203f8890b056b955b3f2654221c70757568932df Review URL: https://chromiumcodereview.appspot.com/9700047 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@127002 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/browser/chromeos/dbus/mock_introspectable_client.h')
-rw-r--r--chrome/browser/chromeos/dbus/mock_introspectable_client.h25
1 files changed, 25 insertions, 0 deletions
diff --git a/chrome/browser/chromeos/dbus/mock_introspectable_client.h b/chrome/browser/chromeos/dbus/mock_introspectable_client.h
new file mode 100644
index 0000000..e71e300
--- /dev/null
+++ b/chrome/browser/chromeos/dbus/mock_introspectable_client.h
@@ -0,0 +1,25 @@
+// Copyright (c) 2012 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#ifndef CHROME_BROWSER_CHROMEOS_DBUS_MOCK_INTROSPECTABLE_CLIENT_H_
+#define CHROME_BROWSER_CHROMEOS_DBUS_MOCK_INTROSPECTABLE_CLIENT_H_
+
+#include "chrome/browser/chromeos/dbus/introspectable_client.h"
+#include "testing/gmock/include/gmock/gmock.h"
+
+namespace chromeos {
+
+class MockIntrospectableClient : public IntrospectableClient {
+ public:
+ MockIntrospectableClient();
+ virtual ~MockIntrospectableClient();
+
+ MOCK_METHOD3(Introspect, void(const std::string&,
+ const dbus::ObjectPath&,
+ const IntrospectCallback&));
+};
+
+} // namespace chromeos
+
+#endif // CHROME_BROWSER_CHROMEOS_DBUS_MOCK_INTROSPECTABLE_CLIENT_H_