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

Unified Diff: content/shell/renderer/test_runner/text_input_controller.h

Issue 144013010: Move TextInputController from CppBoundClass to gin::Wrappable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TextInputController1 -> TextInputController Created 6 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 side-by-side diff with in-line comments
Download patch
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_

Powered by Google App Engine
This is Rietveld 408576698