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

Side by Side Diff: extensions/browser/api/virtual_keyboard_private/virtual_keyboard_delegate.h

Issue 2687853002: Switching VirtualKeyboardPrivate keyboard config call stack to receive HasInputDevices() responce a… (Closed)
Patch Set: Fix for compilation error on linux_chromium_chromeos Created 3 years, 10 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
OLDNEW
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 EXTENSIONS_BROWSER_API_VIRTUAL_KEYBOARD_PRIVATE_VIRTUAL_KEYBOARD_DELEGAT E_H_ 5 #ifndef EXTENSIONS_BROWSER_API_VIRTUAL_KEYBOARD_PRIVATE_VIRTUAL_KEYBOARD_DELEGAT E_H_
6 #define EXTENSIONS_BROWSER_API_VIRTUAL_KEYBOARD_PRIVATE_VIRTUAL_KEYBOARD_DELEGAT E_H_ 6 #define EXTENSIONS_BROWSER_API_VIRTUAL_KEYBOARD_PRIVATE_VIRTUAL_KEYBOARD_DELEGAT E_H_
7 7
8 #include "base/callback.h"
8 #include "base/macros.h" 9 #include "base/macros.h"
9 #include "base/strings/string16.h" 10 #include "base/strings/string16.h"
10 #include "base/values.h" 11 #include "base/values.h"
11 #include "content/public/browser/browser_thread.h" 12 #include "content/public/browser/browser_thread.h"
12 13
13 namespace extensions { 14 namespace extensions {
14 15
15 class VirtualKeyboardDelegate { 16 class VirtualKeyboardDelegate {
16 public: 17 public:
17 virtual ~VirtualKeyboardDelegate() {} 18 virtual ~VirtualKeyboardDelegate() {}
18 19
20 using OnKeyboardSettingsCallback =
21 base::Callback<void(std::unique_ptr<base::DictionaryValue> settings)>;
22
19 // Fetch information about the preferred configuration of the keyboard. On 23 // Fetch information about the preferred configuration of the keyboard. On
20 // exit, |settings| is populated with the keyboard configuration. Returns true 24 // exit, |settings| is populated with the keyboard configuration if execution
21 // if successful. 25 // is successful, otherwise it's set to nullptr.
22 virtual bool GetKeyboardConfig(base::DictionaryValue* settings) = 0; 26 virtual void GetKeyboardConfig(
27 OnKeyboardSettingsCallback on_settings_callback) = 0;
23 28
24 // Dismiss the virtual keyboard without changing input focus. Returns true if 29 // Dismiss the virtual keyboard without changing input focus. Returns true if
25 // successful. 30 // successful.
26 virtual bool HideKeyboard() = 0; 31 virtual bool HideKeyboard() = 0;
27 32
28 // Insert |text| verbatim into a text area. Returns true if successful. 33 // Insert |text| verbatim into a text area. Returns true if successful.
29 virtual bool InsertText(const base::string16& text) = 0; 34 virtual bool InsertText(const base::string16& text) = 0;
30 35
31 // Notifiy system that keyboard loading is complete. Used in UMA stats to 36 // Notifiy system that keyboard loading is complete. Used in UMA stats to
32 // track loading performance. Returns true if the notification was handled. 37 // track loading performance. Returns true if the notification was handled.
(...skipping 29 matching lines...) Expand all
62 // Sets virtual keyboard window mode. 67 // Sets virtual keyboard window mode.
63 virtual bool SetVirtualKeyboardMode(int mode_enum) = 0; 68 virtual bool SetVirtualKeyboardMode(int mode_enum) = 0;
64 69
65 // Sets requested virtual keyboard state. 70 // Sets requested virtual keyboard state.
66 virtual bool SetRequestedKeyboardState(int state_enum) = 0; 71 virtual bool SetRequestedKeyboardState(int state_enum) = 0;
67 }; 72 };
68 73
69 } // namespace extensions 74 } // namespace extensions
70 75
71 #endif // EXTENSIONS_BROWSER_API_VIRTUAL_KEYBOARD_PRIVATE_VIRTUAL_KEYBOARD_DELE GATE_H_ 76 #endif // EXTENSIONS_BROWSER_API_VIRTUAL_KEYBOARD_PRIVATE_VIRTUAL_KEYBOARD_DELE GATE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698