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

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

Issue 20145004: Switch from text insertion to key press and release events on the virtual k… (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Merge with trunk. Created 7 years, 3 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 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
(...skipping 18 matching lines...) Expand all
30 DECLARE_EXTENSION_FUNCTION("virtualKeyboardPrivate.moveCursor", 30 DECLARE_EXTENSION_FUNCTION("virtualKeyboardPrivate.moveCursor",
31 VIRTUALKEYBOARDPRIVATE_MOVECURSOR); 31 VIRTUALKEYBOARDPRIVATE_MOVECURSOR);
32 32
33 protected: 33 protected:
34 virtual ~MoveCursorFunction() {} 34 virtual ~MoveCursorFunction() {}
35 35
36 // ExtensionFunction. 36 // ExtensionFunction.
37 virtual bool RunImpl() OVERRIDE; 37 virtual bool RunImpl() OVERRIDE;
38 }; 38 };
39 39
40 class SendKeyEventFunction : public SyncExtensionFunction {
41 public:
42 DECLARE_EXTENSION_FUNCTION(
43 "virtualKeyboardPrivate.sendKeyEvent",
44 VIRTUALKEYBOARDPRIVATE_SENDKEYEVENT);
45
46 protected:
47 virtual ~SendKeyEventFunction() {}
48
49 // ExtensionFunction:
50 virtual bool RunImpl() OVERRIDE;
51 };
52
40 class InputAPI : public ProfileKeyedAPI { 53 class InputAPI : public ProfileKeyedAPI {
41 public: 54 public:
42 explicit InputAPI(Profile* profile); 55 explicit InputAPI(Profile* profile);
43 virtual ~InputAPI(); 56 virtual ~InputAPI();
44 57
45 // ProfileKeyedAPI implementation. 58 // ProfileKeyedAPI implementation.
46 static ProfileKeyedAPIFactory<InputAPI>* GetFactoryInstance(); 59 static ProfileKeyedAPIFactory<InputAPI>* GetFactoryInstance();
47 60
48 private: 61 private:
49 friend class ProfileKeyedAPIFactory<InputAPI>; 62 friend class ProfileKeyedAPIFactory<InputAPI>;
50 63
51 // ProfileKeyedAPI implementation. 64 // ProfileKeyedAPI implementation.
52 static const char* service_name() { 65 static const char* service_name() {
53 return "InputAPI"; 66 return "InputAPI";
54 } 67 }
55 static const bool kServiceIsNULLWhileTesting = true; 68 static const bool kServiceIsNULLWhileTesting = true;
56 }; 69 };
57 70
58 } // namespace extensions 71 } // namespace extensions
59 72
60 #endif // CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_ 73 #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