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

Unified Diff: webkit/tools/test_shell/plain_text_controller.h

Issue 243032: First implementation of PlainTextController. (Closed)
Patch Set: '' Created 11 years, 1 month 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
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | webkit/tools/test_shell/plain_text_controller.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: webkit/tools/test_shell/plain_text_controller.h
===================================================================
--- webkit/tools/test_shell/plain_text_controller.h (revision 0)
+++ webkit/tools/test_shell/plain_text_controller.h (revision 0)
@@ -0,0 +1,39 @@
+// Copyright (c) 2006-2009 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.
+
+// PlainTextController class:
+// Bound to a JavaScript window.plainText object using
+// CppBoundClass::BindToJavascript(), this allows layout tests that are run in
+// the test_shell to extract plain text from the DOM or the selection.
+//
+// The OSX reference file is in
+// WebKit/WebKitTools/DumpRenderTree/PlainTextController.mm
+
+#ifndef WEBKIT_TOOLS_TEST_SHELL_PLAIN_TEXT_CONTROLLER_H_
+#define WEBKIT_TOOLS_TEST_SHELL_PLAIN_TEXT_CONTROLLER_H_
+
+#include "build/build_config.h"
+#include "webkit/glue/cpp_bound_class.h"
+
+class TestShell;
+
+class PlainTextController : public CppBoundClass {
+ public:
+ // Builds the property and method lists needed to bind this class to a JS
+ // object.
+ explicit PlainTextController(TestShell* shell);
+
+ // JS callback methods.
+ void plainText(const CppArgumentList& args, CppVariant* result);
+
+ // Fall-back method: called if an unknown method is invoked.
+ void fallbackMethod(const CppArgumentList& args, CppVariant* result);
+
+ private:
+ // Non-owning pointer. The LayoutTestController is owned by the host.
+ static TestShell* shell_;
+};
+
+#endif // WEBKIT_TOOLS_TEST_SHELL_PLAIN_TEXT_CONTROLLER_H_
+
Property changes on: webkit\tools\test_shell\plain_text_controller.h
___________________________________________________________________
Added: svn:eol-style
+ LF
« no previous file with comments | « webkit/tools/layout_tests/test_expectations.txt ('k') | webkit/tools/test_shell/plain_text_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698