| Index: athena/system/system_ui_impl.cc
|
| diff --git a/athena/system/system_ui_impl.cc b/athena/system/system_ui_impl.cc
|
| index 4b94d03a32c47e314b1d94131f802c5d4b6848e1..5bd0e529c7abef1d4bfdd18e648cca4a5234a6e8 100644
|
| --- a/athena/system/system_ui_impl.cc
|
| +++ b/athena/system/system_ui_impl.cc
|
| @@ -4,8 +4,11 @@
|
|
|
| #include "athena/system/public/system_ui.h"
|
|
|
| +#include "athena/system/device_socket_listener.h"
|
| +#include "athena/system/orientation_controller.h"
|
| #include "athena/system/power_button_controller.h"
|
| #include "base/logging.h"
|
| +#include "base/memory/ref_counted.h"
|
| #include "base/memory/scoped_ptr.h"
|
|
|
| namespace athena {
|
| @@ -15,13 +18,16 @@ SystemUI* instance = NULL;
|
|
|
| class SystemUIImpl : public SystemUI {
|
| public:
|
| - SystemUIImpl() : power_button_controller_(new PowerButtonController) {
|
| + SystemUIImpl(scoped_refptr<base::TaskRunner> io_task_runner)
|
| + : orientation_controller_(new OrientationController(io_task_runner)),
|
| + power_button_controller_(new PowerButtonController) {
|
| }
|
|
|
| virtual ~SystemUIImpl() {
|
| }
|
|
|
| private:
|
| + scoped_refptr<OrientationController> orientation_controller_;
|
| scoped_ptr<PowerButtonController> power_button_controller_;
|
|
|
| DISALLOW_COPY_AND_ASSIGN(SystemUIImpl);
|
| @@ -30,8 +36,10 @@ class SystemUIImpl : public SystemUI {
|
| } // namespace
|
|
|
| // static
|
| -SystemUI* SystemUI::Create() {
|
| - instance = new SystemUIImpl;
|
| +SystemUI* SystemUI::Create(
|
| + scoped_refptr<base::TaskRunner> io_task_runner) {
|
| + DeviceSocketListener::CreateSocketManager(io_task_runner);
|
| + instance = new SystemUIImpl(io_task_runner);
|
| return instance;
|
| }
|
|
|
| @@ -40,6 +48,7 @@ void SystemUI::Shutdown() {
|
| CHECK(instance);
|
| delete instance;
|
| instance = NULL;
|
| + DeviceSocketListener::ShutdownSocketManager();
|
| }
|
|
|
| } // namespace athena
|
|
|