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

Side by Side Diff: content/shell/renderer/test_runner/text_input_controller.h

Issue 1167703002: Move test runner to a component (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: updates Created 5 years, 6 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
(Empty)
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
3 // found in the LICENSE file.
4
5 #ifndef CONTENT_SHELL_RENDERER_TEST_RUNNER_TEXT_INPUT_CONTROLLER_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEXT_INPUT_CONTROLLER_H_
7
8 #include <string>
9 #include <vector>
10
11 #include "base/macros.h"
12 #include "base/memory/weak_ptr.h"
13
14 namespace blink {
15 class WebFrame;
16 class WebView;
17 }
18
19 namespace content {
20
21 // TextInputController is bound to window.textInputController in Javascript
22 // when content_shell is running. Layout tests use it to exercise various
23 // corners of text input.
24 class TextInputController : public base::SupportsWeakPtr<TextInputController> {
25 public:
26 TextInputController();
27 ~TextInputController();
28
29 void Install(blink::WebFrame* frame);
30
31 void SetWebView(blink::WebView* view);
32
33 private:
34 friend class TextInputControllerBindings;
35
36 void InsertText(const std::string& text);
37 void UnmarkText();
38 void DoCommand(const std::string& text);
39 void SetMarkedText(const std::string& text, int start, int length);
40 bool HasMarkedText();
41 std::vector<int> MarkedRange();
42 std::vector<int> SelectedRange();
43 std::vector<int> FirstRectForCharacterRange(unsigned location,
44 unsigned length);
45 void SetComposition(const std::string& text);
46
47 blink::WebView* view_;
48
49 base::WeakPtrFactory<TextInputController> weak_factory_;
50
51 DISALLOW_COPY_AND_ASSIGN(TextInputController);
52 };
53
54 } // namespace content
55
56 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEXT_INPUT_CONTROLLER_H_
OLDNEW
« no previous file with comments | « content/shell/renderer/test_runner/test_runner.cc ('k') | content/shell/renderer/test_runner/text_input_controller.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698