#ifndef CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_
#define CHROME_BROWSER_EXTENSIONS_API_INPUT_INPUT_H_
#include "base/compiler_specific.h"
#include "extensions/browser/browser_context_keyed_api_factory.h"
#include "extensions/browser/extension_function.h"
namespace content {
class BrowserContext;
}
namespace extensions {
class VirtualKeyboardPrivateInsertTextFunction : public SyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("virtualKeyboardPrivate.insertText",
VIRTUALKEYBOARDPRIVATE_INSERTTEXT);
protected:
virtual ~VirtualKeyboardPrivateInsertTextFunction() {}
virtual bool RunImpl() OVERRIDE;
};
class VirtualKeyboardPrivateMoveCursorFunction : public SyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION("virtualKeyboardPrivate.moveCursor",
VIRTUALKEYBOARDPRIVATE_MOVECURSOR);
protected:
virtual ~VirtualKeyboardPrivateMoveCursorFunction() {}
virtual bool RunImpl() OVERRIDE;
};
class VirtualKeyboardPrivateSendKeyEventFunction
: public SyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"virtualKeyboardPrivate.sendKeyEvent",
VIRTUALKEYBOARDPRIVATE_SENDKEYEVENT);
protected:
virtual ~VirtualKeyboardPrivateSendKeyEventFunction() {}
virtual bool RunImpl() OVERRIDE;
};
class VirtualKeyboardPrivateHideKeyboardFunction
: public SyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"virtualKeyboardPrivate.hideKeyboard",
VIRTUALKEYBOARDPRIVATE_HIDEKEYBOARD);
protected:
virtual ~VirtualKeyboardPrivateHideKeyboardFunction() {}
virtual bool RunImpl() OVERRIDE;
};
class VirtualKeyboardPrivateLockKeyboardFunction
: public SyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"virtualKeyboardPrivate.lockKeyboard",
VIRTUALKEYBOARDPRIVATE_LOCKKEYBOARD);
protected:
virtual ~VirtualKeyboardPrivateLockKeyboardFunction() {}
virtual bool RunImpl() OVERRIDE;
};
class VirtualKeyboardPrivateKeyboardLoadedFunction
: public SyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"virtualKeyboardPrivate.keyboardLoaded",
VIRTUALKEYBOARDPRIVATE_KEYBOARDLOADED);
protected:
virtual ~VirtualKeyboardPrivateKeyboardLoadedFunction() {}
virtual bool RunImpl() OVERRIDE;
};
class VirtualKeyboardPrivateGetKeyboardConfigFunction
: public SyncExtensionFunction {
public:
DECLARE_EXTENSION_FUNCTION(
"virtualKeyboardPrivate.getKeyboardConfig",
VIRTUALKEYBOARDPRIVATE_GETKEYBOARDCONFIG);
protected:
virtual ~VirtualKeyboardPrivateGetKeyboardConfigFunction() {}
virtual bool RunImpl() OVERRIDE;
};
class InputAPI : public BrowserContextKeyedAPI {
public:
explicit InputAPI(content::BrowserContext* context);
virtual ~InputAPI();
static BrowserContextKeyedAPIFactory<InputAPI>* GetFactoryInstance();
private:
friend class BrowserContextKeyedAPIFactory<InputAPI>;
static const char* service_name() {
return "InputAPI";
}
static const bool kServiceIsNULLWhileTesting = true;
};
}
#endif