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

Side by Side Diff: views/controls/textfield/native_textfield_wrapper.h

Issue 6675005: Integrate the new input method API for Views into Chromium. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix Windows build. Created 9 years, 8 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 | « views/controls/textfield/native_textfield_win.cc ('k') | views/controls/textfield/textfield.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2011 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 VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ 6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
7 #pragma once 7 #pragma once
8 8
9 #include "base/string16.h" 9 #include "base/string16.h"
10 #include "ui/gfx/native_widget_types.h" 10 #include "ui/gfx/native_widget_types.h"
11 11
12 namespace gfx { 12 namespace gfx {
13 class Insets; 13 class Insets;
14 } // namespace gfx 14 } // namespace gfx
15 15
16 namespace ui { 16 namespace ui {
17 class Range; 17 class Range;
18 } // namespace ui 18 } // namespace ui
19 19
20 namespace views { 20 namespace views {
21 21
22 class KeyEvent; 22 class KeyEvent;
23 class Textfield; 23 class Textfield;
24 class TextInputClient;
24 class View; 25 class View;
25 26
26 // An interface implemented by an object that provides a platform-native 27 // An interface implemented by an object that provides a platform-native
27 // text field. 28 // text field.
28 class NativeTextfieldWrapper { 29 class NativeTextfieldWrapper {
29 public: 30 public:
30 // The Textfield calls this when it is destroyed to clean up the wrapper 31 // The Textfield calls this when it is destroyed to clean up the wrapper
31 // object. 32 // object.
32 virtual ~NativeTextfieldWrapper() {} 33 virtual ~NativeTextfieldWrapper() {}
33 34
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
113 // otherwise. 114 // otherwise.
114 // See also View::OnKeyPressed/OnKeyReleased. 115 // See also View::OnKeyPressed/OnKeyReleased.
115 virtual bool HandleKeyPressed(const views::KeyEvent& e) = 0; 116 virtual bool HandleKeyPressed(const views::KeyEvent& e) = 0;
116 virtual bool HandleKeyReleased(const views::KeyEvent& e) = 0; 117 virtual bool HandleKeyReleased(const views::KeyEvent& e) = 0;
117 118
118 // Invoked when focus is being moved from or to the Textfield. 119 // Invoked when focus is being moved from or to the Textfield.
119 // See also View::OnFocus/OnBlur. 120 // See also View::OnFocus/OnBlur.
120 virtual void HandleFocus() = 0; 121 virtual void HandleFocus() = 0;
121 virtual void HandleBlur() = 0; 122 virtual void HandleBlur() = 0;
122 123
124 // Returns the View's TextInputClient instance or NULL if the View doesn't
125 // support text input.
126 virtual TextInputClient* GetTextInputClient() = 0;
127
123 // Creates an appropriate NativeTextfieldWrapper for the platform. 128 // Creates an appropriate NativeTextfieldWrapper for the platform.
124 static NativeTextfieldWrapper* CreateWrapper(Textfield* field); 129 static NativeTextfieldWrapper* CreateWrapper(Textfield* field);
125 }; 130 };
126 131
127 } // namespace views 132 } // namespace views
128 133
129 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_ 134 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WRAPPER_H_
OLDNEW
« no previous file with comments | « views/controls/textfield/native_textfield_win.cc ('k') | views/controls/textfield/textfield.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698