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

Side by Side Diff: webkit/glue/webtextinput_impl.h

Issue 164225: Switch to WebFrame from the WebKit API.... (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: '' Created 11 years, 4 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
« no previous file with comments | « webkit/glue/webtextinput.h ('k') | webkit/glue/webtextinput_impl.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright (c) 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 // Class WebTextInputImpl provides implementation of WebTextInput which is
6 // used by TextInputController in test_shell. It only facilitates layout tests
7 // and should not be used by renderers.
8
9 #ifndef WEBKIT_GLUE_WEBTEXTINPUT_IMPL_H_
10 #define WEBKIT_GLUE_WEBTEXTINPUT_IMPL_H_
11
12 #include "webkit/glue/webtextinput.h"
13
14 class WebFrameImpl;
15
16 class WebTextInputImpl : public WebTextInput {
17 public:
18 WebTextInputImpl(WebFrameImpl* web_frame_impl);
19 virtual ~WebTextInputImpl();
20
21 // WebTextInput methods
22 virtual void InsertText(const string16& text);
23 virtual void DoCommand(const string16& command);
24 virtual void SetMarkedText(const string16& text,
25 int32_t location, int32_t length);
26 virtual void UnMarkText();
27 virtual bool HasMarkedText();
28 virtual void MarkedRange(std::string* range_str);
29 virtual void SelectedRange(std::string* range_str);
30 virtual void ValidAttributesForMarkedText(std::string* attributes);
31
32 // TODO(huanr): examine all layout tests involving TextInputController
33 // and implement these functions if necessary.
34 virtual void ConversationIdentifier();
35 virtual void SubstringFromRange(int32_t location, int32_t length);
36 virtual void AttributedSubstringFromRange(int32_t location,
37 int32_t length);
38 virtual void FirstRectForCharacterRange(int32_t location,
39 int32_t length);
40 virtual void CharacterIndexForPoint(double x, double y);
41 virtual void MakeAttributedString(const std::string& str);
42
43 private:
44 WebCore::Frame* GetFrame();
45 WebCore::Editor* GetEditor();
46
47 void DeleteToEndOfParagraph();
48
49 // Holding a non-owning pointer to the web frame we are associated with.
50 WebFrameImpl* web_frame_impl_;
51
52 DISALLOW_COPY_AND_ASSIGN(WebTextInputImpl);
53 };
54
55 #endif // #ifndef WEBKIT_GLUE_WEBTEXTINPUT_IMPL_H_
OLDNEW
« no previous file with comments | « webkit/glue/webtextinput.h ('k') | webkit/glue/webtextinput_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698