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

Side by Side Diff: components/test_runner/text_input_controller.h

Issue 2171503005: Rename WebTestProxy to WebViewTestProxy. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: addressing comments Created 4 years, 5 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 unified diff | Download patch
OLDNEW
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 WebLocalFrame; 15 class WebLocalFrame;
16 class WebView; 16 class WebView;
17 } 17 }
18 18
19 namespace test_runner { 19 namespace test_runner {
20 20
21 class WebTestProxyBase; 21 class WebViewTestProxyBase;
22 22
23 // TextInputController is bound to window.textInputController in Javascript 23 // TextInputController is bound to window.textInputController in Javascript
24 // when content_shell is running. Layout tests use it to exercise various 24 // when content_shell is running. Layout tests use it to exercise various
25 // corners of text input. 25 // corners of text input.
26 class TextInputController { 26 class TextInputController {
27 public: 27 public:
28 explicit TextInputController(WebTestProxyBase* web_test_proxy_base); 28 explicit TextInputController(WebViewTestProxyBase* web_view_test_proxy_base);
29 ~TextInputController(); 29 ~TextInputController();
30 30
31 void Install(blink::WebLocalFrame* frame); 31 void Install(blink::WebLocalFrame* frame);
32 32
33 private: 33 private:
34 friend class TextInputControllerBindings; 34 friend class TextInputControllerBindings;
35 35
36 void InsertText(const std::string& text); 36 void InsertText(const std::string& text);
37 void UnmarkText(); 37 void UnmarkText();
38 void DoCommand(const std::string& text); 38 void DoCommand(const std::string& text);
39 void SetMarkedText(const std::string& text, int start, int length); 39 void SetMarkedText(const std::string& text, int start, int length);
40 bool HasMarkedText(); 40 bool HasMarkedText();
41 std::vector<int> MarkedRange(); 41 std::vector<int> MarkedRange();
42 std::vector<int> SelectedRange(); 42 std::vector<int> SelectedRange();
43 std::vector<int> FirstRectForCharacterRange(unsigned location, 43 std::vector<int> FirstRectForCharacterRange(unsigned location,
44 unsigned length); 44 unsigned length);
45 void SetComposition(const std::string& text); 45 void SetComposition(const std::string& text);
46 46
47 blink::WebView* view(); 47 blink::WebView* view();
48 WebTestProxyBase* web_test_proxy_base_; 48 WebViewTestProxyBase* web_view_test_proxy_base_;
49 49
50 base::WeakPtrFactory<TextInputController> weak_factory_; 50 base::WeakPtrFactory<TextInputController> weak_factory_;
51 51
52 DISALLOW_COPY_AND_ASSIGN(TextInputController); 52 DISALLOW_COPY_AND_ASSIGN(TextInputController);
53 }; 53 };
54 54
55 } // namespace test_runner 55 } // namespace test_runner
56 56
57 #endif // COMPONENTS_TEST_RUNNER_TEXT_INPUT_CONTROLLER_H_ 57 #endif // COMPONENTS_TEST_RUNNER_TEXT_INPUT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « components/test_runner/test_runner_for_specific_view.cc ('k') | components/test_runner/text_input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698