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

Side by Side Diff: dbus/test_service.h

Issue 7845029: Stop restricting the sender object path for incoming signals. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 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 | « dbus/object_proxy.cc ('k') | dbus/test_service.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) 2011 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_TEST_SERVICE_H_ 5 #ifndef DBUS_TEST_SERVICE_H_
6 #define DBUS_TEST_SERVICE_H_ 6 #define DBUS_TEST_SERVICE_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/compiler_specific.h" 9 #include "base/compiler_specific.h"
10 #include "base/memory/ref_counted.h" 10 #include "base/memory/ref_counted.h"
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 55
56 // Shuts down the service and blocks until it's done. 56 // Shuts down the service and blocks until it's done.
57 void ShutdownAndBlock(); 57 void ShutdownAndBlock();
58 58
59 // Returns true if the bus has the D-Bus thread. 59 // Returns true if the bus has the D-Bus thread.
60 bool HasDBusThread(); 60 bool HasDBusThread();
61 61
62 // Sends "Test" signal with the given message from the exported object. 62 // Sends "Test" signal with the given message from the exported object.
63 void SendTestSignal(const std::string& message); 63 void SendTestSignal(const std::string& message);
64 64
65 // Sends "Test" signal with the given message from the root object ("/").
66 // This function emulates dbus-send's behavior.
67 void SendTestSignalFromRoot(const std::string& message);
68
65 private: 69 private:
66 // Helper function for SendTestSignal(). 70 // Helper function for SendTestSignal().
67 void SendTestSignalInternal(const std::string& message); 71 void SendTestSignalInternal(const std::string& message);
68 72
73 // Helper function for SendTestSignalFromRoot.
74 void SendTestSignalFromRootInternal(const std::string& message);
75
69 // Helper function for ShutdownAndBlock(). 76 // Helper function for ShutdownAndBlock().
70 void ShutdownAndBlockInternal(); 77 void ShutdownAndBlockInternal();
71 78
72 // Called when a method is exported. 79 // Called when a method is exported.
73 void OnExported(const std::string& interface_name, 80 void OnExported(const std::string& interface_name,
74 const std::string& method_name, 81 const std::string& method_name,
75 bool success); 82 bool success);
76 83
77 // base::Thread override. 84 // base::Thread override.
78 virtual void Run(MessageLoop* message_loop); 85 virtual void Run(MessageLoop* message_loop);
(...skipping 17 matching lines...) Expand all
96 // The number of methods actually exported. 103 // The number of methods actually exported.
97 int num_exported_methods_; 104 int num_exported_methods_;
98 105
99 scoped_refptr<Bus> bus_; 106 scoped_refptr<Bus> bus_;
100 ExportedObject* exported_object_; 107 ExportedObject* exported_object_;
101 }; 108 };
102 109
103 } // namespace dbus 110 } // namespace dbus
104 111
105 #endif // DBUS_TEST_SERVICE_H_ 112 #endif // DBUS_TEST_SERVICE_H_
OLDNEW
« no previous file with comments | « dbus/object_proxy.cc ('k') | dbus/test_service.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698