Chromium Code Reviews| Index: content/shell/renderer/test_runner/text_input_controller.h |
| diff --git a/content/shell/renderer/test_runner/text_input_controller.h b/content/shell/renderer/test_runner/text_input_controller.h |
| new file mode 100644 |
| index 0000000000000000000000000000000000000000..b38bc8cbb3e92cf1fc46d8d7cb8cb4457fe00004 |
| --- /dev/null |
| +++ b/content/shell/renderer/test_runner/text_input_controller.h |
| @@ -0,0 +1,55 @@ |
| +// Copyright 2014 The Chromium Authors. All rights reserved. |
| +// Use of this source code is governed by a BSD-style license that can be |
| +// found in the LICENSE file. |
| + |
| +#ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEXTINPUTCONTROLLER_H_ |
| +#define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEXTINPUTCONTROLLER_H_ |
| + |
| +#include "base/macros.h" |
| +#include "gin/wrappable.h" |
| + |
| +namespace blink { |
| +class WebFrame; |
| +} |
| + |
| +namespace gin { |
| +class Arguments; |
| +} |
| + |
| +namespace WebTestRunner { |
|
jochen (gone - plz use gerrit)
2014/02/10 12:32:05
while at it, you could update the namespace to con
|
| + |
| +// TextInputController is bound to window.textInputController in Javascript |
| +// when content_shell is running. Layout tests use it to exercise various |
| +// corners of text input. |
| +class TextInputController : public gin::Wrappable<TextInputController> { |
| + public: |
| + static gin::WrapperInfo kWrapperInfo; |
| + |
| + static void Install(blink::WebFrame* frame); |
| + |
| + private: |
| + TextInputController(blink::WebFrame* frame); |
| + virtual ~TextInputController(); |
| + |
| + // gin::WrappableBase: |
| + virtual gin::ObjectTemplateBuilder GetObjectTemplateBuilder( |
| + v8::Isolate* isolate) OVERRIDE; |
| + |
| + void InsertText(gin::Arguments* args); |
| + void UnmarkText(); |
| + void DoCommand(gin::Arguments* args); |
| + void SetMarkedText(gin::Arguments* args); |
| + void HasMarkedText(); |
| + void MarkedRange(); |
| + void SelectedRange(); |
| + void FirstRectForCharacterRange(gin::Arguments* args); |
| + void SetComposition(gin::Arguments* args); |
| + |
| + blink::WebFrame* frame_; |
| + |
| + DISALLOW_COPY_AND_ASSIGN(TextInputController); |
| +}; |
| + |
| +} // namespace WebTestRunner |
| + |
| +#endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEXTINPUTCONTROLLER_H_ |