OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef COMPONENTS_TEST_RUNNER_TEXT_INPUT_CONTROLLER_H_ | 5 #ifndef COMPONENTS_TEST_RUNNER_TEXT_INPUT_CONTROLLER_H_ |
6 #define COMPONENTS_TEST_RUNNER_TEXT_INPUT_CONTROLLER_H_ | 6 #define COMPONENTS_TEST_RUNNER_TEXT_INPUT_CONTROLLER_H_ |
7 | 7 |
8 #include <string> | 8 #include <string> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
11 #include "base/macros.h" | 11 #include "base/macros.h" |
12 #include "base/memory/weak_ptr.h" | 12 #include "base/memory/weak_ptr.h" |
13 | 13 |
14 namespace blink { | 14 namespace blink { |
| 15 class WebInputMethodController; |
15 class WebLocalFrame; | 16 class WebLocalFrame; |
16 class WebView; | 17 class WebView; |
17 } | 18 } |
18 | 19 |
19 namespace test_runner { | 20 namespace test_runner { |
20 | 21 |
21 class WebViewTestProxyBase; | 22 class WebViewTestProxyBase; |
22 | 23 |
23 // TextInputController is bound to window.textInputController in Javascript | 24 // TextInputController is bound to window.textInputController in Javascript |
24 // when content_shell is running. Layout tests use it to exercise various | 25 // when content_shell is running. Layout tests use it to exercise various |
(...skipping 13 matching lines...) Expand all Loading... |
38 void DoCommand(const std::string& text); | 39 void DoCommand(const std::string& text); |
39 void SetMarkedText(const std::string& text, int start, int length); | 40 void SetMarkedText(const std::string& text, int start, int length); |
40 bool HasMarkedText(); | 41 bool HasMarkedText(); |
41 std::vector<int> MarkedRange(); | 42 std::vector<int> MarkedRange(); |
42 std::vector<int> SelectedRange(); | 43 std::vector<int> SelectedRange(); |
43 std::vector<int> FirstRectForCharacterRange(unsigned location, | 44 std::vector<int> FirstRectForCharacterRange(unsigned location, |
44 unsigned length); | 45 unsigned length); |
45 void SetComposition(const std::string& text); | 46 void SetComposition(const std::string& text); |
46 | 47 |
47 blink::WebView* view(); | 48 blink::WebView* view(); |
| 49 blink::WebInputMethodController* inputMethodController(); |
| 50 |
48 WebViewTestProxyBase* web_view_test_proxy_base_; | 51 WebViewTestProxyBase* web_view_test_proxy_base_; |
49 | 52 |
50 base::WeakPtrFactory<TextInputController> weak_factory_; | 53 base::WeakPtrFactory<TextInputController> weak_factory_; |
51 | 54 |
52 DISALLOW_COPY_AND_ASSIGN(TextInputController); | 55 DISALLOW_COPY_AND_ASSIGN(TextInputController); |
53 }; | 56 }; |
54 | 57 |
55 } // namespace test_runner | 58 } // namespace test_runner |
56 | 59 |
57 #endif // COMPONENTS_TEST_RUNNER_TEXT_INPUT_CONTROLLER_H_ | 60 #endif // COMPONENTS_TEST_RUNNER_TEXT_INPUT_CONTROLLER_H_ |
OLD | NEW |