Index: chromeos/dbus/console_service_client.h |
diff --git a/chromeos/dbus/console_service_client.h b/chromeos/dbus/console_service_client.h |
new file mode 100644 |
index 0000000000000000000000000000000000000000..270944ee041d42452ced5f727532fc87e6ace464 |
--- /dev/null |
+++ b/chromeos/dbus/console_service_client.h |
@@ -0,0 +1,46 @@ |
+// Copyright 2014 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 CHROMEOS_DBUS_CROS_CONSOLE_SERVICE_CLIENT_H_ |
+#define CHROMEOS_DBUS_CROS_CONSOLE_SERVICE_CLIENT_H_ |
stevenjb
2014/10/31 17:00:46
s/CROS_//
dsodman
2014/10/31 17:54:34
Done.
|
+ |
+#include "base/observer_list.h" |
+#include "chromeos/chromeos_export.h" |
+#include "chromeos/dbus/dbus_client.h" |
+ |
+namespace dbus { |
+class Bus; |
+class MethodCall; |
+class ExportedObject; |
+} |
stevenjb
2014/10/31 17:00:46
None of these appear to be used in this header.
dsodman
2014/10/31 17:54:34
Done.
|
+ |
+namespace chromeos { |
+ |
+class CHROMEOS_EXPORT ConsoleServiceClient : public DBusClient { |
+ public: |
+ class Observer { |
+ public: |
+ virtual ~Observer() {} |
stevenjb
2014/10/31 17:00:46
Destructor should be protected.
dsodman
2014/10/31 17:54:34
Done.
|
+ virtual void OnActivateConsole(int console_id) {} |
stevenjb
2014/10/31 17:00:47
This should be a pure virtual (= 0)
dsodman
2014/10/31 17:54:34
Done.
|
+ }; |
+ |
+ virtual void AddObserver(Observer* observer) = 0; |
+ virtual void RemoveObserver(Observer* observer) = 0; |
+ virtual bool HasObserver(Observer* observer) = 0; |
+ |
+ static ConsoleServiceClient* Create(); |
+ static ConsoleServiceClient* GetInstance(); |
+ virtual ~ConsoleServiceClient() {} |
stevenjb
2014/10/31 17:00:46
Use override:
~ConsoleServiceClient() override;
Al
dsodman
2014/10/31 17:54:34
Done.
|
+ |
+ protected: |
+ ConsoleServiceClient(); |
+ |
+ private: |
+ static ConsoleServiceClient* instance; |
stevenjb
2014/10/31 17:00:46
Do not make this a class member, make it a file lo
dsodman
2014/10/31 17:54:34
Done.
|
+ DISALLOW_COPY_AND_ASSIGN(ConsoleServiceClient); |
+}; |
+ |
+} // namespace chromeos |
+ |
+#endif // CHROMEOS_DBUS_CROS_CONSOLE_SERVICE_CLIENT_H_ |