| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_EXTENSIONS_API_VIRTUAL_KEYBOARD_PRIVATE_CHROME_VIRTUAL_KE
YBOARD_DELEGATE_H_ | 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_VIRTUAL_KEYBOARD_PRIVATE_CHROME_VIRTUAL_KE
YBOARD_DELEGATE_H_ |
| 6 #define CHROME_BROWSER_EXTENSIONS_API_VIRTUAL_KEYBOARD_PRIVATE_CHROME_VIRTUAL_KE
YBOARD_DELEGATE_H_ | 6 #define CHROME_BROWSER_EXTENSIONS_API_VIRTUAL_KEYBOARD_PRIVATE_CHROME_VIRTUAL_KE
YBOARD_DELEGATE_H_ |
| 7 | 7 |
| 8 #include "base/compiler_specific.h" | 8 #include "base/compiler_specific.h" |
| 9 #include "base/macros.h" | 9 #include "base/macros.h" |
| 10 #include "base/memory/weak_ptr.h" |
| 10 #include "extensions/browser/api/virtual_keyboard_private/virtual_keyboard_deleg
ate.h" | 11 #include "extensions/browser/api/virtual_keyboard_private/virtual_keyboard_deleg
ate.h" |
| 11 | 12 |
| 12 namespace extensions { | 13 namespace extensions { |
| 13 | 14 |
| 14 class ChromeVirtualKeyboardDelegate : public VirtualKeyboardDelegate { | 15 class ChromeVirtualKeyboardDelegate : public VirtualKeyboardDelegate { |
| 15 public: | 16 public: |
| 16 ChromeVirtualKeyboardDelegate() {} | 17 ChromeVirtualKeyboardDelegate(); |
| 17 ~ChromeVirtualKeyboardDelegate() override {} | 18 ~ChromeVirtualKeyboardDelegate() override; |
| 18 bool GetKeyboardConfig(base::DictionaryValue* settings) override; | 19 |
| 20 void GetKeyboardConfig( |
| 21 OnKeyboardSettingsCallback on_settings_callback) override; |
| 19 bool HideKeyboard() override; | 22 bool HideKeyboard() override; |
| 20 bool InsertText(const base::string16& text) override; | 23 bool InsertText(const base::string16& text) override; |
| 21 bool OnKeyboardLoaded() override; | 24 bool OnKeyboardLoaded() override; |
| 22 void SetHotrodKeyboard(bool enable) override; | 25 void SetHotrodKeyboard(bool enable) override; |
| 23 bool LockKeyboard(bool state) override; | 26 bool LockKeyboard(bool state) override; |
| 24 bool SendKeyEvent(const std::string& type, | 27 bool SendKeyEvent(const std::string& type, |
| 25 int char_value, | 28 int char_value, |
| 26 int key_code, | 29 int key_code, |
| 27 const std::string& key_name, | 30 const std::string& key_name, |
| 28 int modifiers) override; | 31 int modifiers) override; |
| 29 bool ShowLanguageSettings() override; | 32 bool ShowLanguageSettings() override; |
| 30 bool IsLanguageSettingsEnabled() override; | 33 bool IsLanguageSettingsEnabled() override; |
| 31 bool SetVirtualKeyboardMode(int mode_enum) override; | 34 bool SetVirtualKeyboardMode(int mode_enum) override; |
| 32 bool SetRequestedKeyboardState(int state_enum) override; | 35 bool SetRequestedKeyboardState(int state_enum) override; |
| 33 | 36 |
| 34 private: | 37 private: |
| 38 void OnHasInputDevices(OnKeyboardSettingsCallback on_settings_callback, |
| 39 bool has_input_devices); |
| 40 |
| 41 base::WeakPtr<ChromeVirtualKeyboardDelegate> weak_this_; |
| 42 base::WeakPtrFactory<ChromeVirtualKeyboardDelegate> weak_factory_; |
| 35 DISALLOW_COPY_AND_ASSIGN(ChromeVirtualKeyboardDelegate); | 43 DISALLOW_COPY_AND_ASSIGN(ChromeVirtualKeyboardDelegate); |
| 36 }; | 44 }; |
| 37 | 45 |
| 38 } // namespace extensions | 46 } // namespace extensions |
| 39 | 47 |
| 40 #endif // CHROME_BROWSER_EXTENSIONS_API_VIRTUAL_KEYBOARD_PRIVATE_CHROME_VIRTUAL
_KEYBOARD_DELEGATE_H_ | 48 #endif // CHROME_BROWSER_EXTENSIONS_API_VIRTUAL_KEYBOARD_PRIVATE_CHROME_VIRTUAL
_KEYBOARD_DELEGATE_H_ |
| OLD | NEW |