| OLD | NEW |
| (Empty) |
| 1 // Copyright (c) 2006-2009 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 // PlainTextController class: | |
| 6 // Bound to a JavaScript window.plainText object using | |
| 7 // CppBoundClass::BindToJavascript(), this allows layout tests that are run in | |
| 8 // the test_shell to extract plain text from the DOM or the selection. | |
| 9 // | |
| 10 // The OSX reference file is in | |
| 11 // WebKit/Tools/DumpRenderTree/PlainTextController.mm | |
| 12 | |
| 13 #ifndef WEBKIT_TOOLS_TEST_SHELL_PLAIN_TEXT_CONTROLLER_H_ | |
| 14 #define WEBKIT_TOOLS_TEST_SHELL_PLAIN_TEXT_CONTROLLER_H_ | |
| 15 | |
| 16 #include "build/build_config.h" | |
| 17 #include "webkit/glue/cpp_bound_class.h" | |
| 18 | |
| 19 class TestShell; | |
| 20 | |
| 21 class PlainTextController : public CppBoundClass { | |
| 22 public: | |
| 23 // Builds the property and method lists needed to bind this class to a JS | |
| 24 // object. | |
| 25 explicit PlainTextController(TestShell* shell); | |
| 26 | |
| 27 // JS callback methods. | |
| 28 void plainText(const CppArgumentList& args, CppVariant* result); | |
| 29 | |
| 30 // Fall-back method: called if an unknown method is invoked. | |
| 31 void fallbackMethod(const CppArgumentList& args, CppVariant* result); | |
| 32 | |
| 33 private: | |
| 34 // Non-owning pointer. The LayoutTestController is owned by the host. | |
| 35 static TestShell* shell_; | |
| 36 }; | |
| 37 | |
| 38 #endif // WEBKIT_TOOLS_TEST_SHELL_PLAIN_TEXT_CONTROLLER_H_ | |
| OLD | NEW |