| OLD | NEW |
| 1 // Copyright (c) 2009 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2010 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 <oleacc.h> |
| 13 #include <tom.h> // For ITextDocument, a COM interface to CRichEditCtrl | 14 #include <tom.h> // For ITextDocument, a COM interface to CRichEditCtrl |
| 14 #include <vsstyle.h> | 15 #include <vsstyle.h> |
| 15 | 16 |
| 16 #include "app/menus/simple_menu_model.h" | 17 #include "app/menus/simple_menu_model.h" |
| 17 #include "base/scoped_comptr_win.h" | 18 #include "base/scoped_comptr_win.h" |
| 18 #include "gfx/insets.h" | 19 #include "gfx/insets.h" |
| 19 #include "views/controls/textfield/native_textfield_wrapper.h" | 20 #include "views/controls/textfield/native_textfield_wrapper.h" |
| 20 | 21 |
| 21 namespace views { | 22 namespace views { |
| 22 | 23 |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 64 virtual gfx::NativeView GetTestingHandle() const; | 65 virtual gfx::NativeView GetTestingHandle() const; |
| 65 virtual bool IsIMEComposing() const; | 66 virtual bool IsIMEComposing() const; |
| 66 | 67 |
| 67 // Overridden from menus::SimpleMenuModel::Delegate: | 68 // Overridden from menus::SimpleMenuModel::Delegate: |
| 68 virtual bool IsCommandIdChecked(int command_id) const; | 69 virtual bool IsCommandIdChecked(int command_id) const; |
| 69 virtual bool IsCommandIdEnabled(int command_id) const; | 70 virtual bool IsCommandIdEnabled(int command_id) const; |
| 70 virtual bool GetAcceleratorForCommandId(int command_id, | 71 virtual bool GetAcceleratorForCommandId(int command_id, |
| 71 menus::Accelerator* accelerator); | 72 menus::Accelerator* accelerator); |
| 72 virtual void ExecuteCommand(int command_id); | 73 virtual void ExecuteCommand(int command_id); |
| 73 | 74 |
| 75 // Update accessibility information. |
| 76 void InitializeAccessibilityInfo(); |
| 77 void UpdateAccessibleState(uint32 state_flag, bool set_value); |
| 78 void UpdateAccessibleValue(const std::wstring& value); |
| 79 |
| 74 // CWindowImpl | 80 // CWindowImpl |
| 75 BEGIN_MSG_MAP(Edit) | 81 BEGIN_MSG_MAP(Edit) |
| 76 MSG_WM_CHAR(OnChar) | 82 MSG_WM_CHAR(OnChar) |
| 77 MSG_WM_CONTEXTMENU(OnContextMenu) | 83 MSG_WM_CONTEXTMENU(OnContextMenu) |
| 78 MSG_WM_COPY(OnCopy) | 84 MSG_WM_COPY(OnCopy) |
| 79 MSG_WM_CUT(OnCut) | 85 MSG_WM_CUT(OnCut) |
| 80 MESSAGE_HANDLER_EX(WM_IME_CHAR, OnImeChar) | 86 MESSAGE_HANDLER_EX(WM_IME_CHAR, OnImeChar) |
| 81 MESSAGE_HANDLER_EX(WM_IME_STARTCOMPOSITION, OnImeStartComposition) | 87 MESSAGE_HANDLER_EX(WM_IME_STARTCOMPOSITION, OnImeStartComposition) |
| 82 MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeComposition) | 88 MESSAGE_HANDLER_EX(WM_IME_COMPOSITION, OnImeComposition) |
| 83 MESSAGE_HANDLER_EX(WM_IME_ENDCOMPOSITION, OnImeEndComposition) | 89 MESSAGE_HANDLER_EX(WM_IME_ENDCOMPOSITION, OnImeEndComposition) |
| (...skipping 126 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 210 // text to emulate Firefox. | 216 // text to emulate Firefox. |
| 211 bool ime_discard_composition_; | 217 bool ime_discard_composition_; |
| 212 int ime_composition_start_; | 218 int ime_composition_start_; |
| 213 int ime_composition_length_; | 219 int ime_composition_length_; |
| 214 | 220 |
| 215 // TODO(beng): remove this when we are a subclass of NativeControlWin. | 221 // TODO(beng): remove this when we are a subclass of NativeControlWin. |
| 216 NativeViewHost* container_view_; | 222 NativeViewHost* container_view_; |
| 217 | 223 |
| 218 COLORREF bg_color_; | 224 COLORREF bg_color_; |
| 219 | 225 |
| 226 // The accessibility state of this object. |
| 227 int accessibility_state_; |
| 228 |
| 220 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin); | 229 DISALLOW_COPY_AND_ASSIGN(NativeTextfieldWin); |
| 221 }; | 230 }; |
| 222 | 231 |
| 223 } // namespace views | 232 } // namespace views |
| 224 | 233 |
| 225 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ | 234 #endif // VIEWS_CONTROLS_TEXTFIELD_NATIVE_TEXTFIELD_WIN_H_ |
| OLD | NEW |