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

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

Issue 144013010: Move TextInputController from CppBoundClass to gin::Wrappable. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: TextInputControllerBindings Created 6 years, 10 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 | Annotate | Revision Log
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_TEXTINPUTCONTROLLER_H_
6 #define CONTENT_SHELL_RENDERER_TEST_RUNNER_TEXTINPUTCONTROLLER_H_
7
8 #include <string>
9
10 #include "base/macros.h"
11 #include "base/memory/weak_ptr.h"
12 #include "third_party/WebKit/public/web/WebBindings.h"
jochen (gone - plz use gerrit) 2014/02/13 13:08:24 don't include this
tfarina 2014/02/13 13:14:06 Done.
13
14 namespace blink {
15 class WebFrame;
16 }
17
18 namespace content {
19
20 // TextInputController is bound to window.textInputController in Javascript
21 // when content_shell is running. Layout tests use it to exercise various
22 // corners of text input.
23 class TextInputController : public base::SupportsWeakPtr<TextInputController> {
24 public:
25 TextInputController();
26 ~TextInputController();
27
28 void Install(blink::WebFrame* frame);
29
30 private:
31 friend class TextInputControllerBindings;
32
33 void InsertText(const std::string& text);
34 void UnmarkText();
35 void DoCommand(const std::string& text);
36 void SetMarkedText(const std::string& text);
37 bool HasMarkedText();
38 NPObject* MarkedRange();
39 NPObject* SelectedRange();
jochen (gone - plz use gerrit) 2014/02/13 13:08:24 don't return an NPObject here. Return std::vector<
tfarina 2014/02/13 13:14:06 Done.
40 NPObject* FirstRectForCharacterRange(const std::string& text);
41 void SetComposition(const std::string& text);
42
43 blink::WebFrame* frame_;
44
45 base::WeakPtrFactory<TextInputController> weak_factory_;
46
47 DISALLOW_COPY_AND_ASSIGN(TextInputController);
48 };
49
50 } // namespace content
51
52 #endif // CONTENT_SHELL_RENDERER_TEST_RUNNER_TEXTINPUTCONTROLLER_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698