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

Side by Side Diff: chrome/browser/extensions/api/input/input.h

Issue 16972006: Insert text directly from the virtual keyboard. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: fix include Created 7 years, 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | chrome/browser/extensions/api/input/input.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 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_INPUT_INPUT_H_ 5 #ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_
6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_ 6 #define CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_
7 7
8 #include "base/compiler_specific.h" 8 #include "base/compiler_specific.h"
9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h" 9 #include "chrome/browser/extensions/api/profile_keyed_api_factory.h"
10 #include "chrome/browser/extensions/extension_function.h" 10 #include "chrome/browser/extensions/extension_function.h"
11 11
12 class Profile; 12 class Profile;
13 13
14 namespace extensions { 14 namespace extensions {
15 15
16 class SendKeyboardEventInputFunction : public SyncExtensionFunction { 16 class InsertTextInputFunction : public SyncExtensionFunction {
17 public: 17 public:
18 DECLARE_EXTENSION_FUNCTION( 18 DECLARE_EXTENSION_FUNCTION(
19 "experimental.input.virtualKeyboard.sendKeyboardEvent", 19 "experimental.input.virtualKeyboard.insertText",
20 EXPERIMENTAL_INPUT_VIRTUALKEYBOARD_SENDKEYBOARDEVENT); 20 EXPERIMENTAL_INPUT_VIRTUALKEYBOARD_INSERTTEXT);
21 21
22 protected: 22 protected:
23 virtual ~SendKeyboardEventInputFunction() {} 23 virtual ~InsertTextInputFunction() {}
24 24
25 // ExtensionFunction: 25 // ExtensionFunction:
26 virtual bool RunImpl() OVERRIDE; 26 virtual bool RunImpl() OVERRIDE;
27 }; 27 };
28 28
29 class InputAPI : public ProfileKeyedAPI { 29 class InputAPI : public ProfileKeyedAPI {
30 public: 30 public:
31 explicit InputAPI(Profile* profile); 31 explicit InputAPI(Profile* profile);
32 virtual ~InputAPI(); 32 virtual ~InputAPI();
33 33
34 // ProfileKeyedAPI implementation. 34 // ProfileKeyedAPI implementation.
35 static ProfileKeyedAPIFactory<InputAPI>* GetFactoryInstance(); 35 static ProfileKeyedAPIFactory<InputAPI>* GetFactoryInstance();
36 36
37 private: 37 private:
38 friend class ProfileKeyedAPIFactory<InputAPI>; 38 friend class ProfileKeyedAPIFactory<InputAPI>;
39 39
40 // ProfileKeyedAPI implementation. 40 // ProfileKeyedAPI implementation.
41 static const char* service_name() { 41 static const char* service_name() {
42 return "InputAPI"; 42 return "InputAPI";
43 } 43 }
44 static const bool kServiceIsNULLWhileTesting = true; 44 static const bool kServiceIsNULLWhileTesting = true;
45 }; 45 };
46 46
47 } // namespace extensions 47 } // namespace extensions
48 48
49 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_ 49 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_
OLDNEW
« no previous file with comments | « no previous file | chrome/browser/extensions/api/input/input.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698