OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 CHROME_BROWSER_CHROMEOS_LOGIN_KEYBOARD_DRIVEN_OOBE_KEY_HANDLER_H_ | 5 #ifndef CHROMEOS_DBUS_FAKE_SMS_CLIENT_H_ |
6 #define CHROME_BROWSER_CHROMEOS_LOGIN_KEYBOARD_DRIVEN_OOBE_KEY_HANDLER_H_ | 6 #define CHROMEOS_DBUS_FAKE_SMS_CLIENT_H_ |
7 | 7 |
8 #include "base/basictypes.h" | 8 #include "base/basictypes.h" |
9 #include "base/compiler_specific.h" | 9 #include "base/compiler_specific.h" |
10 #include "ui/events/event_handler.h" | 10 #include "base/memory/weak_ptr.h" |
| 11 #include "chromeos/dbus/sms_client.h" |
11 | 12 |
12 namespace chromeos { | 13 namespace chromeos { |
13 | 14 |
14 // A class to handle special menu key for keyboard driven OOBE. | 15 class FakeSMSClient : public SMSClient { |
15 class KeyboardDrivenOobeKeyHandler : public ui::EventHandler { | |
16 public: | 16 public: |
17 KeyboardDrivenOobeKeyHandler(); | 17 FakeSMSClient(); |
18 virtual ~KeyboardDrivenOobeKeyHandler(); | 18 virtual ~FakeSMSClient(); |
| 19 |
| 20 virtual void Init(dbus::Bus* bus) OVERRIDE; |
| 21 |
| 22 virtual void GetAll(const std::string& service_name, |
| 23 const dbus::ObjectPath& object_path, |
| 24 const GetAllCallback& callback) OVERRIDE; |
19 | 25 |
20 private: | 26 private: |
21 // ui::EventHandler | 27 void OnGetAll(base::DictionaryValue* sms, const GetAllCallback& callback); |
22 virtual void OnKeyEvent(ui::KeyEvent* event) OVERRIDE; | |
23 | 28 |
24 DISALLOW_COPY_AND_ASSIGN(KeyboardDrivenOobeKeyHandler); | 29 base::WeakPtrFactory<FakeSMSClient> weak_ptr_factory_; |
| 30 |
| 31 DISALLOW_COPY_AND_ASSIGN(FakeSMSClient); |
25 }; | 32 }; |
26 | 33 |
27 } // namespace chromeos | 34 } // namespace chromeos |
28 | 35 |
29 #endif // CHROME_BROWSER_CHROMEOS_LOGIN_KEYBOARD_DRIVEN_OOBE_KEY_HANDLER_H_ | 36 #endif // CHROMEOS_DBUS_FAKE_SMS_CLIENT_H_ |
OLD | NEW |