| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 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 | 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_WIN_H_ | 5 #ifndef VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ |
| 6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ | 6 #define VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ |
| 7 | 7 |
| 8 #include <atlbase.h> | 8 #include <atlbase.h> |
| 9 #include <atlapp.h> | 9 #include <atlapp.h> |
| 10 #include <atlcrack.h> | 10 #include <atlcrack.h> |
| 11 #include <atlctrls.h> | 11 #include <atlctrls.h> |
| 12 #include <atlmisc.h> | 12 #include <atlmisc.h> |
| 13 #include <tom.h> // For ITextDocument, a COM interface to CRichEditCtrl | 13 #include <tom.h> // For ITextDocument, a COM interface to CRichEditCtrl |
| 14 #include <vsstyle.h> | 14 #include <vsstyle.h> |
| 15 | 15 |
| 16 #include "base/scoped_comptr_win.h" |
| 16 #include "views/controls/menu/simple_menu_model.h" | 17 #include "views/controls/menu/simple_menu_model.h" |
| 17 #include "views/controls/textfield/native_textfield_wrapper.h" | 18 #include "views/controls/textfield/native_textfield_wrapper.h" |
| 18 | 19 |
| 19 namespace views { | 20 namespace views { |
| 20 | 21 |
| 21 class NativeViewHost; | 22 class NativeViewHost; |
| 22 class Textfield; | 23 class Textfield; |
| 23 | 24 |
| 24 static const int kDefaultEditStyle = WS_CHILD | WS_VISIBLE; | 25 static const int kDefaultEditStyle = WS_CHILD | WS_VISIBLE; |
| 25 | 26 |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 188 static bool did_load_library_; | 189 static bool did_load_library_; |
| 189 | 190 |
| 190 // The contents of the context menu for the edit. | 191 // The contents of the context menu for the edit. |
| 191 scoped_ptr<SimpleMenuModel> context_menu_contents_; | 192 scoped_ptr<SimpleMenuModel> context_menu_contents_; |
| 192 scoped_ptr<Menu2> context_menu_; | 193 scoped_ptr<Menu2> context_menu_; |
| 193 | 194 |
| 194 // Border insets. | 195 // Border insets. |
| 195 gfx::Insets content_insets_; | 196 gfx::Insets content_insets_; |
| 196 | 197 |
| 197 // This interface is useful for accessing the CRichEditCtrl at a low level. | 198 // This interface is useful for accessing the CRichEditCtrl at a low level. |
| 198 mutable CComQIPtr<ITextDocument> text_object_model_; | 199 mutable ScopedComPtr<ITextDocument> text_object_model_; |
| 199 | 200 |
| 200 // The position and the length of the ongoing composition string. | 201 // The position and the length of the ongoing composition string. |
| 201 // These values are used for removing a composition string from a search | 202 // These values are used for removing a composition string from a search |
| 202 // text to emulate Firefox. | 203 // text to emulate Firefox. |
| 203 bool ime_discard_composition_; | 204 bool ime_discard_composition_; |
| 204 int ime_composition_start_; | 205 int ime_composition_start_; |
| 205 int ime_composition_length_; | 206 int ime_composition_length_; |
| 206 | 207 |
| 207 // TODO(beng): remove this when we are a subclass of NativeControlWin. | 208 // TODO(beng): remove this when we are a subclass of NativeControlWin. |
| 208 NativeViewHost* container_view_; | 209 NativeViewHost* container_view_; |
| 209 | 210 |
| 210 COLORREF bg_color_; | 211 COLORREF bg_color_; |
| 211 | 212 |
| 212 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin); | 213 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin); |
| 213 }; | 214 }; |
| 214 | 215 |
| 215 } // namespace views | 216 } // namespace views |
| 216 | 217 |
| 217 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ | 218 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ |
| OLD | NEW |